diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 5dc92e13..95f10fdd 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -1213,15 +1213,18 @@ call_handlers (struct MHD_Connection *con, | |||
1213 | if (con->tls_read_ready) | 1213 | if (con->tls_read_ready) |
1214 | read_ready = true; | 1214 | read_ready = true; |
1215 | #endif /* HTTPS_SUPPORT */ | 1215 | #endif /* HTTPS_SUPPORT */ |
1216 | if ( (MHD_EVENT_LOOP_INFO_READ == con->event_loop_info) && | ||
1217 | (read_ready || (force_close && con->sk_nonblck)) ) | ||
1218 | { | ||
1219 | MHD_connection_handle_read (con, force_close); | ||
1220 | mhd_assert (! force_close || MHD_CONNECTION_CLOSED == con->state); | ||
1221 | ret = MHD_connection_handle_idle (con); | ||
1222 | if (force_close) | ||
1223 | return ret; | ||
1224 | states_info_processed = true; | ||
1225 | } | ||
1216 | if (! force_close) | 1226 | if (! force_close) |
1217 | { | 1227 | { |
1218 | if ( (MHD_EVENT_LOOP_INFO_READ == con->event_loop_info) && | ||
1219 | read_ready) | ||
1220 | { | ||
1221 | MHD_connection_handle_read (con); | ||
1222 | ret = MHD_connection_handle_idle (con); | ||
1223 | states_info_processed = true; | ||
1224 | } | ||
1225 | /* No need to check value of 'ret' here as closed connection | 1228 | /* No need to check value of 'ret' here as closed connection |
1226 | * cannot be in MHD_EVENT_LOOP_INFO_WRITE state. */ | 1229 | * cannot be in MHD_EVENT_LOOP_INFO_WRITE state. */ |
1227 | if ( (MHD_EVENT_LOOP_INFO_WRITE == con->event_loop_info) && | 1230 | if ( (MHD_EVENT_LOOP_INFO_WRITE == con->event_loop_info) && |