Skip to content

Commit

Permalink
Fixed stopping websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
lostystyg committed Jun 27, 2022
1 parent 8c9006b commit 4429a24
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,8 @@ void HTTPWebSocket::StartHTTPSocket(int threadCount, int threadPostCount, bool s
void HTTPWebSocket::StopHTTPSocket()
{
// Interrupting socket here because stop without interrupting is illegal.
InterruptHTTPSocket();

// Resetting queue as it has done previously that restricts running this socket again.
// However this doesn't affect current rpc handlers because they handle their own shared_ptr of queue, but adding new rpc handlers
// is UB after this call.
m_workQueue.reset();
HTTPSocket::InterruptHTTPSocket();
HTTPSocket::StopHTTPSocket();
m_workPostQueue.reset();
}

Expand Down

0 comments on commit 4429a24

Please sign in to comment.