[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Suspended connections when stop daemon
From: |
flavio.ceolin |
Subject: |
[libmicrohttpd] Suspended connections when stop daemon |
Date: |
Tue, 10 Nov 2015 12:03:40 -0200 |
Hi folks,
I guess i found a problem with suspended connections. There is a
scenarion where one can resume a connection and then stop the daemon
without gives the daemon the oportunity to really resume the connection.
In this case, microhttpd will abort telling one that there is suspended
connection (because the connection is still in the daemon's suspended
list).
The following patch solves the problem (i've this problem using external
mainloop).
Regards,
Flavio Ceolin
Index: src/microhttpd/daemon.c
===================================================================
--- src/microhttpd/daemon.c (revision 36651)
+++ src/microhttpd/daemon.c (working copy)
@@ -4489,6 +4489,9 @@
if (NULL == daemon)
return;
+ if (MHD_USE_SUSPEND_RESUME & daemon->options)
+ resume_suspended_connections (daemon);
+
daemon->shutdown = MHD_YES;
fd = daemon->socket_fd;
daemon->socket_fd = MHD_INVALID_SOCKET;
- [libmicrohttpd] Suspended connections when stop daemon,
flavio.ceolin <=