[Top][All Lists]

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

Re: [libmicrohttpd] Sockets remain in CLOSE_WAIT state

From: Christian Grothoff
Subject: Re: [libmicrohttpd] Sockets remain in CLOSE_WAIT state
Date: Mon, 7 Jan 2019 13:16:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 1/5/19 3:15 PM, Santos Das wrote:
> Since socket close is called by MHD, could you please let me know in
> which conditions MHD will not close the socket after receiving the FIN
> from the client side?

I can only think of two cases:

1) If MHD is still transmitting the response and there was no error
(SIGPIPE) from the OS yet indicating that the response transmission is
in trouble (i.e. half-closed, client still reading), or,

2) when the application _suspended_ the connection and did not resume it
(or equivalently if the application is busy-waiting/blocking on
generating the reply for badly written applications).

In all other cases MHD should close the connection when the client
closes it.

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

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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