libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] MHD_suspend_connection and MHD_resume_connection wit


From: Luke Dashjr
Subject: Re: [libmicrohttpd] MHD_suspend_connection and MHD_resume_connection with MHD_USE_POLL
Date: Thu, 9 Apr 2015 08:47:56 +0000
User-agent: KMail/1.13.7 (Linux/3.14.37-gentoo; KDE/4.14.3; x86_64; ; )

On Thursday, April 09, 2015 5:28:51 AM Denis Dowling wrote:
> Hi all,
> 
> I was trying to use MHD_suspend_connection() and MHD_resume_connection() to
> implement long polling on a request. I am using options
> MHD_USE_SELECT_INTERNALLY and MHD_USE_POLL options. I noticed the server
> thread went to 100% CPU after the first MHD_resume_connection() call.
> Looking at the code in MHD_poll_all() I can see that the file descriptor
> from daemon->wpipe[0] gets inserted into the list of file descriptors to
> poll but this file descriptor is never read so every time this function is
> called it returns immediately. The code works fine if I drop to using just
> MHD_USE_SELECT_INTERNALLY.
> 
> The patch below fixes the problem.

Does it work besides that? I was never able to get it to work at all...

Luke



reply via email to

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