diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-08 14:28:42 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-08 14:28:49 +0100 |
commit | 4627d005d2ead3a3b7f34b25b9e6528d2f9ed99b (patch) | |
tree | 037ee8f004fcedfebdc45ecd6742dae8f03a9b28 /src/microhttpd/connection.c | |
parent | a7c913850dd88d5ebb82e4b5013fdab1074dbaa8 (diff) | |
download | libmicrohttpd-4627d005d2ead3a3b7f34b25b9e6528d2f9ed99b.tar.gz libmicrohttpd-4627d005d2ead3a3b7f34b25b9e6528d2f9ed99b.zip |
add assertion to guard against bad behavior described in #7196, also document that after suspending one must return MHD_YES
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index b983e7ed..ddf62d77 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -868,6 +868,7 @@ MHD_connection_close_ (struct MHD_Connection *connection, | |||
868 | struct MHD_Daemon *daemon = connection->daemon; | 868 | struct MHD_Daemon *daemon = connection->daemon; |
869 | struct MHD_Response *resp = connection->rp.response; | 869 | struct MHD_Response *resp = connection->rp.response; |
870 | 870 | ||
871 | mhd_assert (! connection->suspended); | ||
871 | #ifdef MHD_USE_THREADS | 872 | #ifdef MHD_USE_THREADS |
872 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 873 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ |
873 | MHD_thread_ID_match_current_ (connection->pid) ); | 874 | MHD_thread_ID_match_current_ (connection->pid) ); |