diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-11-16 10:07:36 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-11-16 10:07:36 +0100 |
commit | 194d72e1f9628d9dd3e732ef2e199f7d4c43afd6 (patch) | |
tree | bd6d074994b65b70bc9b81d1f568ded05379b432 | |
parent | b357bbaa6fcedfa43af7e2549535112468bde41b (diff) | |
download | libmicrohttpd-194d72e1f9628d9dd3e732ef2e199f7d4c43afd6.tar.gz libmicrohttpd-194d72e1f9628d9dd3e732ef2e199f7d4c43afd6.zip |
indeed this can happen with the fast path where we call the idle handler in a special place just after sending the header, and thus might call it twice for the same connection in the same event loop run, thereby possibly entering cleanup twice, causing trouble; retracting FIXME
-rw-r--r-- | src/microhttpd/connection.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index d8b0f79d..e9613c4e 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -2664,9 +2664,6 @@ cleanup_connection (struct MHD_Connection *connection) | |||
2664 | { | 2664 | { |
2665 | struct MHD_Daemon *daemon = connection->daemon; | 2665 | struct MHD_Daemon *daemon = connection->daemon; |
2666 | 2666 | ||
2667 | /* FIXME: when can this flag ever be needed? Sounds like we should | ||
2668 | avoid this happening in the first place. Also, could there then | ||
2669 | not be a race in this case? */ | ||
2670 | if (connection->in_cleanup) | 2667 | if (connection->in_cleanup) |
2671 | return; /* Prevent double cleanup. */ | 2668 | return; /* Prevent double cleanup. */ |
2672 | connection->in_cleanup = true; | 2669 | connection->in_cleanup = true; |