Oops, I forgot to inform my environment. ^^' It is Windows 7 64 bits and MHD 0.9.47 compiled with MinGW-w64. I don't know if it happens on Linux too.
On Fri, Dec 4, 2015 at 9:02 PM, silvioprog <[email protected]> wrote: > Hello, > > I'm trying to use Keep-Alive in the `MHD_USE_THREAD_PER_CONNECTION` mode > with the `MHD_OPTION_CONNECTION_TIMEOUT` option, however, when timeout is > ends, it locks the client that can't get more responses from my MHD server. > > Is very easy to reproduce that, you just: > > . compile and run this demo[1] (hellobrowser.c modified); > . make some simultaneous requests in the `http://localhost:8080` link; > . wait five or ten more seconds; > . try a new request in the `http://localhost:8080` link. (the client will > locks) > > (the timeout 3 was purposeful to allow to reproduce the problem) > > It seems that the connection is closed when the thread die, yes it's the > right behaviour, but it seems that the client still connected in a 'ghost' > connection, trying new requests in that. Is there any callback to force a > client disconnection? I can't use the `Connection: close` header because I > want to use Keep-Alive. > > Notice: using only the `MHD_USE_SELECT_INTERNALLY` it works fine even with > a timeout, the problem happens only when I declare the > `MHD_USE_THREAD_PER_CONNECTION` option. > > [1] http://pastebin.com/LpmvH87b > > -- > Silvio Clécio > -- Silvio Clécio
