[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] MHD_suspend_connection and MHD_resume_connection wit
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] MHD_suspend_connection and MHD_resume_connection with MHD_USE_POLL |
Date: |
Thu, 09 Apr 2015 09:03:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 |
Oops, thanks. Fixed as suggested in SVN 35510.
Happy hacking!
-Christian
On 04/09/2015 07:28 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.
>
> Regards,
> Denis