commit 3cc303b75076b994c669f98673d3a1295cbabb6a
parent 917342b3fb0547523f2b4c6e607bb2ffd9cacdfd
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 10 May 2017 22:10:09 +0300
Resume resuming connection before other processing in external polling mode
Diffstat:
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+Wed May 10 23:09:00 MSK 2017
+ Resume resuming connection before other processing in external polling
+ mode. -EG
+
Tue May 9 23:16:00 MSK 2017
Fixed: Do not add "Connection: Keep-Alive" header for "upgrade"
connections. -EG
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00095400
+#define MHD_VERSION 0x00095401
/**
* MHD-internal return code for "YES".
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -3477,7 +3477,8 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
}
/* Resuming external connections when using an extern mainloop */
- resume_suspended_connections (daemon);
+ if (0 != (daemon->options & MHD_ALLOW_SUSPEND_RESUME))
+ resume_suspended_connections (daemon);
return internal_run_from_select (daemon, read_fd_set,
write_fd_set, except_fd_set);
@@ -4460,6 +4461,10 @@ MHD_run (struct MHD_Daemon *daemon)
if ( (daemon->shutdown) ||
(0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) )
return MHD_NO;
+ /* Resume resuming connection (if any) so they will be processing
+ * in this turn. */
+ if (0 != (daemon->options & MHD_ALLOW_SUSPEND_RESUME))
+ resume_suspended_connections (daemon);
if (0 != (daemon->options & MHD_USE_POLL))
{
MHD_poll (daemon, MHD_NO);