libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Connection doesn't close after AccessHandlerCallback


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Connection doesn't close after AccessHandlerCallback function returns MHD_NO
Date: Thu, 07 Aug 2014 15:54:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0

On 08/04/2014 05:08 PM, Dominic Weinberger wrote:
> 
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State       PID/Program name Timer
> 
> tcp        0      224748     localhost:53500
> localhost:http-alt      CLOSE_WAIT  -                unkn-4 (1.52/0/0)
> tcp   341202      0          localhost:http-alt
> localhost:53500         FIN_WAIT2   -                off (0.00/0/0)
> 
> As you can see, the socket on the server is in FIN_WAIT2 and the socket on
> the client in CLOSE_WAIT.
> As I understood it the client should change its state to LAST_ACK and then
> send FIN to the server, but it seems like this never happens.
> 
> My question is, has anybody else experienced something similar before?
> Do you know how to solve this problem?
> Is it a problem caused by libcurl or by libmicrohttpd?

As MHD has (correctly) close()d the socket (server is in FIN_WAIT2, see
also https://kb.iu.edu/d/ajmi), there is nothing left for MHD to do with
respect to the connection.

As curl is in CLOSE_WAIT -- the connection is waiting for the curl
client to call 'close()', the cause/bug must be with cURL.

Happy hacking!

Christian

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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