GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
When stopping a Poco::Net::HTTPServer using the stopAll() method, the server won't stop properly if under heavy load. All open connections will be closed, but the server is still accepting new connections during the notification period, before actually closing down the server listening socket. These connections will not be closed, and continue to serve requests if they're using Keep-Alive.
How to reproduce:
A simple fix is swapping the two lines in HTTPServer::stopAll(), so the server socket will be closed before ending already-open connections. See the pull request below.
Currently, a workaround has to be used - first call stop(), then stopAll().