aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-05-10 22:10:09 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-05-11 14:27:59 +0300
commit3cc303b75076b994c669f98673d3a1295cbabb6a (patch)
tree9b96fe090582f5f7bd3ea4661976ac2faaa6b349
parent917342b3fb0547523f2b4c6e607bb2ffd9cacdfd (diff)
downloadlibmicrohttpd-3cc303b75076b994c669f98673d3a1295cbabb6a.tar.gz
libmicrohttpd-3cc303b75076b994c669f98673d3a1295cbabb6a.zip
Resume resuming connection before other processing in external polling mode
-rw-r--r--ChangeLog4
-rw-r--r--src/include/microhttpd.h2
-rw-r--r--src/microhttpd/daemon.c7
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d60111b..3bbaaacb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
1Wed May 10 23:09:00 MSK 2017
2 Resume resuming connection before other processing in external polling
3 mode. -EG
4
1Tue May 9 23:16:00 MSK 2017 5Tue May 9 23:16:00 MSK 2017
2 Fixed: Do not add "Connection: Keep-Alive" header for "upgrade" 6 Fixed: Do not add "Connection: Keep-Alive" header for "upgrade"
3 connections. -EG 7 connections. -EG
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index a026b565..58787d3a 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
126 * Current version of the library. 126 * Current version of the library.
127 * 0x01093001 = 1.9.30-1. 127 * 0x01093001 = 1.9.30-1.
128 */ 128 */
129#define MHD_VERSION 0x00095400 129#define MHD_VERSION 0x00095401
130 130
131/** 131/**
132 * MHD-internal return code for "YES". 132 * MHD-internal return code for "YES".
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index a91d2687..526773e1 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3477,7 +3477,8 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
3477 } 3477 }
3478 3478
3479 /* Resuming external connections when using an extern mainloop */ 3479 /* Resuming external connections when using an extern mainloop */
3480 resume_suspended_connections (daemon); 3480 if (0 != (daemon->options & MHD_ALLOW_SUSPEND_RESUME))
3481 resume_suspended_connections (daemon);
3481 3482
3482 return internal_run_from_select (daemon, read_fd_set, 3483 return internal_run_from_select (daemon, read_fd_set,
3483 write_fd_set, except_fd_set); 3484 write_fd_set, except_fd_set);
@@ -4460,6 +4461,10 @@ MHD_run (struct MHD_Daemon *daemon)
4460 if ( (daemon->shutdown) || 4461 if ( (daemon->shutdown) ||
4461 (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) ) 4462 (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) )
4462 return MHD_NO; 4463 return MHD_NO;
4464 /* Resume resuming connection (if any) so they will be processing
4465 * in this turn. */
4466 if (0 != (daemon->options & MHD_ALLOW_SUSPEND_RESUME))
4467 resume_suspended_connections (daemon);
4463 if (0 != (daemon->options & MHD_USE_POLL)) 4468 if (0 != (daemon->options & MHD_USE_POLL))
4464 { 4469 {
4465 MHD_poll (daemon, MHD_NO); 4470 MHD_poll (daemon, MHD_NO);