aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-01-09 21:55:51 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-01-09 21:55:51 +0300
commit87c722090cd0d9af97d2db5ed7c4c4b5a30fb1f5 (patch)
tree0785b410d7a4cbb9d536d8e63d684b566da38f99 /src/microhttpd/daemon.c
parent491d411a0173ffd71f089c938ef7a32bf9fc62b5 (diff)
downloadlibmicrohttpd-87c722090cd0d9af97d2db5ed7c4c4b5a30fb1f5.tar.gz
libmicrohttpd-87c722090cd0d9af97d2db5ed7c4c4b5a30fb1f5.zip
Fixed processing of data in TLS buffers in epoll mode if more than 128 connections are ready
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index f62aad68..1fc158b5 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3773,6 +3773,13 @@ MHD_epoll (struct MHD_Daemon *daemon,
3773 else 3773 else
3774 timeout_ms = 0; 3774 timeout_ms = 0;
3775 3775
3776#ifdef HTTPS_SUPPORT
3777 /* Reset TLS read-ready.
3778 * New value will be set by read handlers. */
3779 if ( 0 != (daemon->options & MHD_USE_TLS) )
3780 daemon->has_tls_recv_ready = false;
3781#endif /* HTTPS_SUPPORT */
3782
3776 /* drain 'epoll' event queue; need to iterate as we get at most 3783 /* drain 'epoll' event queue; need to iterate as we get at most
3777 MAX_EVENTS in one system call here; in practice this should 3784 MAX_EVENTS in one system call here; in practice this should
3778 pretty much mean only one round, but better an extra loop here 3785 pretty much mean only one round, but better an extra loop here
@@ -3797,12 +3804,6 @@ MHD_epoll (struct MHD_Daemon *daemon,
3797#endif 3804#endif
3798 return MHD_NO; 3805 return MHD_NO;
3799 } 3806 }
3800#ifdef HTTPS_SUPPORT
3801 /* Reset TLS read-ready.
3802 * New value will be set by read handlers. */
3803 if ( 0 != (daemon->options & MHD_USE_TLS) )
3804 daemon->has_tls_recv_ready = 0;
3805#endif /* HTTPS_SUPPORT */
3806 for (i=0;i<(unsigned int) num_events;i++) 3807 for (i=0;i<(unsigned int) num_events;i++)
3807 { 3808 {
3808 /* First, check for the values of `ptr` that would indicate 3809 /* First, check for the values of `ptr` that would indicate