libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Suspended connections when stop daemon


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Suspended connections when stop daemon
Date: Tue, 10 Nov 2015 15:27:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

Fixed as suggested in SVN 36652. -Christian

On 11/10/2015 03:03 PM, address@hidden wrote:
> 
> 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;
> 

Attachment: 0xE29FC3CC.asc
Description: application/pgp-keys


reply via email to

[Prev in Thread] Current Thread [Next in Thread]