diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-11-18 12:54:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-11-18 12:54:01 +0000 |
commit | 774e50c035a357638357dae113c4646f2791ccfa (patch) | |
tree | a4059683d52e49699b455d87fdd69eb3c5594966 /ChangeLog | |
parent | b6db4c24d40321a2e617147793bac471dc0a0a65 (diff) | |
download | libmicrohttpd-774e50c035a357638357dae113c4646f2791ccfa.tar.gz libmicrohttpd-774e50c035a357638357dae113c4646f2791ccfa.zip |
Hi Christian,
the recently added MHD_DAEMON_INFO_CURRENT_CONNECTIONS can return quite
outdated values in MHD_USE_THREAD_PER_CONNECTION mode. The reason is
that closed connections are collected in MHD_cleanup_connections, which
is called only from the select thread. In the
MHD_USE_THREAD_PER_CONNECTION mode that happens only after accepting an
connection -- therefore, the last connection is always not collected and
MHD_DAEMON_INFO_CURRENT_CONNECTIONS returns >= 1, even when there are no
connections. That makes it very unusable to detect whether all
connections have been handled.
Would you consider the attached patch, which calls
MHD_cleanup_connections whenever MHD_DAEMON_INFO_CURRENT_CONNECTIONS is
called? It makes MHD_DAEMON_INFO_CURRENT_CONNECTIONS slower, but the
returned value is much more accurate.
Cheers,
Milan Straka
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,7 @@ | |||
1 | Tue Nov 18 13:52:29 CET 2014 | ||
2 | Call MHD_cleanup_connections() during MHD_DAEMON_INFO_CURRENT_CONNECTIONS | ||
3 | processing for more accurate results. -MS | ||
4 | |||
1 | Wed Oct 29 20:45:21 CET 2014 | 5 | Wed Oct 29 20:45:21 CET 2014 |
2 | Adding MHD_OPTION_LISTENING_ADDRESS_REUSE option allowing clients | 6 | Adding MHD_OPTION_LISTENING_ADDRESS_REUSE option allowing clients |
3 | to force allowing re-use of the address:port combination | 7 | to force allowing re-use of the address:port combination |