libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Hanging connections


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Hanging connections
Date: Tue, 03 Nov 2015 23:52:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

On 11/03/2015 11:02 PM, Phil Rosenberg wrote:
> Hi Ken
> Thanks for the advice. As you say, my callback is not being called AT
> ALL. Here is my start call

That is truly strange.  Not even once on the first request? Have you
tried something like 'fprintf' in the callback and connecting to the
port with TELNET and doing a "GET / http/1.1"-style request by hand?

If the callback still isn't called even once, then double-check that you
did actually call MHD_start_daemon().

> m_daemon = MHD_start_daemon(
> MHD_USE_THREAD_PER_CONNECTION,
> port,
> NULL,
> NULL,
> &HttpDaemon::connectionCallback,
> this,
> MHD_OPTION_NOTIFY_COMPLETED, &HttpDaemon::completeCallback, NULL,
> //variables which allow post to be processed
> MHD_OPTION_END);
> 
> Since posting I have tried MHD_USE_SELECT_INTERNALLY and this seems to
> be working fine. Processing each request is very fast so the multi
> threading I guess isn't needed.

Eh, it's actually typically slower and only useful if your callback is
blocking and that can't be helped.

Happy hacking!

Christian
p.s.: the fix in 0.9.46 probably won't help you, as it only impacts
pipelined connections and not if you're not called at all.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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