[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] upgraded connections remain suspended when using MHD
From: |
Evgeny Grin |
Subject: |
Re: [libmicrohttpd] upgraded connections remain suspended when using MHD_USE_THREAD_PER_CONNECTION |
Date: |
Tue, 9 May 2017 20:12:38 +0300 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Hi Dom,
Could you provide a bit more information: used OS (W32, GNU/Linux,
FreeBSD, something else...), MHD version?
Minimal example also could help.
--
Wishes,
Evgeny
On 09.05.2017 14:12, Dom F wrote:
> Hello,
>
> I start the daemon with these flags:
> MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | MHD_USE_POLL |
> MHD_USE_ITC | MHD_USE_INTERNAL_POLLING_THREAD | MHD_ALLOW_UPGRADE
>
> When I'm finished with an upgraded connection I call:
> MHD_upgrade_action(urh, MHD_UPGRADE_ACTION_CLOSE)
>
> This leaves urh->was_closed and urh->clean_ready as true and returns
> MHD_YES.
>
> MHD_upgrade_action() also calls MHD_resume_connection() but
> resume_suspended_connections() in daemon.c is never called.
>
> So upgraded connections add to daemon->suspended_connections_tail and
> daemon->connections increases until it hits daemon->connection_limit
> then my application starts reporting this:
>
> Server reached connection limit. Closing inbound connection.
>
> Anyone else seeing the same?
>
> Dom
>