diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-11-25 11:44:04 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-11-25 11:44:04 +0300 |
commit | 5f6ccd331f55b313f29161cc9d2077326c21d73f (patch) | |
tree | 09cec79194bf223353b90a710d1b8afa014a2e93 | |
parent | f8c46afbd0564a8a72f65aa406152a54b64b27c0 (diff) | |
download | libmicrohttpd-5f6ccd331f55b313f29161cc9d2077326c21d73f.tar.gz libmicrohttpd-5f6ccd331f55b313f29161cc9d2077326c21d73f.zip |
test_client_put_stop: handle correctly close phase on the client side
-rw-r--r-- | src/microhttpd/test_client_put_stop.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/microhttpd/test_client_put_stop.c b/src/microhttpd/test_client_put_stop.c index 9a3c3a67..ce197190 100644 --- a/src/microhttpd/test_client_put_stop.c +++ b/src/microhttpd/test_client_put_stop.c | |||
@@ -763,12 +763,15 @@ _MHD_dumbClient_process_from_fdsets (struct _MHD_dumbClient *clnt, | |||
763 | { | 763 | { |
764 | if (_MHD_dumbClient_needs_process (clnt)) | 764 | if (_MHD_dumbClient_needs_process (clnt)) |
765 | return _MHD_dumbClient_process (clnt); | 765 | return _MHD_dumbClient_process (clnt); |
766 | else if (_MHD_dumbClient_needs_recv (clnt) && FD_ISSET (clnt->sckt, rs)) | 766 | else if (MHD_INVALID_SOCKET != clnt->sckt) |
767 | return _MHD_dumbClient_process (clnt); | 767 | { |
768 | else if (_MHD_dumbClient_needs_send (clnt) && FD_ISSET (clnt->sckt, ws)) | 768 | if (_MHD_dumbClient_needs_recv (clnt) && FD_ISSET (clnt->sckt, rs)) |
769 | return _MHD_dumbClient_process (clnt); | 769 | return _MHD_dumbClient_process (clnt); |
770 | else if (FD_ISSET (clnt->sckt, es)) | 770 | else if (_MHD_dumbClient_needs_send (clnt) && FD_ISSET (clnt->sckt, ws)) |
771 | return _MHD_dumbClient_process (clnt); | 771 | return _MHD_dumbClient_process (clnt); |
772 | else if (FD_ISSET (clnt->sckt, es)) | ||
773 | return _MHD_dumbClient_process (clnt); | ||
774 | } | ||
772 | return DUMB_CLIENT_FINISHED == clnt->stage; | 775 | return DUMB_CLIENT_FINISHED == clnt->stage; |
773 | } | 776 | } |
774 | 777 | ||