commit e58921377a4017a5549cb28877fed6e6cc2a6959 parent 1a029357bbb73896b60689034662bbba7f88bfe5 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Sat, 30 Sep 2017 19:24:42 +0300 resume_suspended_connections(): fixed assert at daemon shutdown. Diffstat:
| M | src/microhttpd/daemon.c | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2671,9 +2671,12 @@ resume_suspended_connections (struct MHD_Daemon *daemon) MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); if (daemon->resuming) - prev = daemon->suspended_connections_tail; + { + prev = daemon->suspended_connections_tail; + /* During shutdown check for resuming is forced. */ + mhd_assert((NULL != prev) || (daemon->shutdown)); + } - mhd_assert(NULL != prev); daemon->resuming = false; while (NULL != (pos = prev))