That is certainly worrying, as MHD goes over all active connections on
destroy and calls 'shutdown' on them.  As a result,
poll() should not block on any of them and "instantly" return.

So the first thing I'd look at is what FDs the process still has
open (any?) at this time, and what 'poll' is exactly waiting on.
(Note that we use 'shutdown' in this phase instead of 'close' to avoid
races on the FDs with the application.)

Also, we did not make any changes to the code since 0.9.33 that
would 'fix' this kind of issue.

Happy hacking!

Christian

On 04/30/14 16:37, Lorenzo Miniero wrote:
> 
> What could be the cause? I guess that one of the threads serving the
> connections (MHD_USE_THREAD_PER_CONNECTION is used in my case) was still
> alive, but as I anticipated there's actually no request pending anymore,
> and all the tabs in the browser were closed as well, which should have
> closed the Ajax requests I use to contact the MHD-based server. What may
> be causing the poll to get stuck all that time, and how can I force it
> to unblock? EINTR can't be used as it is intercepted by the code, and a
> continue is issued without checking whether the webserver is closing or
> not. I'm using 0.9.33 by the way, not sure whether this was already
> fixed in 0.9.34 or not.
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to