mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Websocket: Close onloop during Terminate()
Terminate() is called when Zeek shuts down. If WebSocket client threads were blocked in QueueForProcessing() due to reaching queue limits, these previously would not exit QueueForProcessing() and instead block indefinitely, resulting in the ixwebsocket library blocking and its garbage collection thread running at 100%. Not great. Closing the onloop instance will unblock the WebSocket client threads for a timely shutdown. Closes #4420
This commit is contained in:
parent
6ebec6dde7
commit
bb06af601f
6 changed files with 115 additions and 0 deletions
|
@ -247,6 +247,8 @@ void WebSocketEventDispatcher::Terminate() {
|
|||
}
|
||||
|
||||
clients.clear();
|
||||
|
||||
onloop->Close();
|
||||
}
|
||||
|
||||
void WebSocketEventDispatcher::QueueForProcessing(WebSocketEvent&& event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue