Skip to content

Commit 6c37cad

Browse files
committed
Close listening socket before stopping running connections
If sending the serverStopped event to currently active connections happens before actually closing the server socket, new connections will be accepted in between, which in turn will stay open and prevent the HTTP server from stopping completely.
1 parent f905715 commit 6c37cad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Net/src/HTTPServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ HTTPServer::~HTTPServer()
7070

7171
void HTTPServer::stopAll(bool abortCurrent)
7272
{
73-
_pFactory->serverStopped(this, abortCurrent);
7473
stop();
74+
_pFactory->serverStopped(this, abortCurrent);
7575
}
7676

7777

0 commit comments

Comments
 (0)