libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] upgraded connections remain suspended when using MHD


From: Dom F
Subject: Re: [libmicrohttpd] upgraded connections remain suspended when using MHD_USE_THREAD_PER_CONNECTION
Date: Wed, 10 May 2017 09:21:14 +0100
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

I'm using MHD versions 0.9.54 and latest from git on both FreeBSD 11 and Linux (I think CentOS 7 with v3.10 kernel).
No extra args to ./configure on Linux.
HTTPS,  gnutls and libgcrypt related args to ./configure on FreeBSD.

My MHD_UpgradeHandler creates a new thread, immediately detached, which does the following:

Put socket into blocking mode
Loop doing read() and processing received data until error, EOF or "close" websocket frame
Call MHD_upgrade_action(urh, MHD_UPGRADE_ACTION_CLOSE)
Exit thread

It is also possible that I might call "shutdown(sock, SHUT_RDWR)" from another thread to cause above loop to exit.



reply via email to

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