[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Suspended connections when stop daemon
From: |
flavio.ceolin |
Subject: |
Re: [libmicrohttpd] Suspended connections when stop daemon |
Date: |
Tue, 10 Nov 2015 13:33:08 -0200 |
Hi Christian,
Thanks a lot :)
> 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;
>>