[Top][All Lists]

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

Re: [libmicrohttpd] How to close all upgraded connections when shutting

From: Nicolas Mora
Subject: Re: [libmicrohttpd] How to close all upgraded connections when shutting down MHD_Daemon?
Date: Thu, 4 May 2017 09:41:22 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Do you use HTTP or HTTPS?
Eventually, since it's a framework for both http and https, I will use both protocols.

You must not call MHD_stop_daemon() while you still have some not closed
"upgraded" connections.
May be we should add more alarming message in case of such API violation.
I understand.
What I have thought of is to store a signature of all opened upgraded connections in an array, then before calling MHD_stop_daemon(), going through each connection, and close them. I guess that's the most clean way to do it.

Could you provide a minimal example?

The file provides a minimal example of what I intend to do, although it's still in progress.

reply via email to

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