mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
cluster/websocket: Propagate code and reason to websocket_client_lost()
This allows to get visibility into the reason why ixwebsocket or the client decided to disconnect. Closed #4440
This commit is contained in:
parent
aaddeb19ad
commit
a61aff010f
11 changed files with 131 additions and 6 deletions
|
@ -135,7 +135,8 @@ std::unique_ptr<WebSocketServer> StartServer(std::unique_ptr<WebSocketEventDispa
|
|||
dispatcher->QueueForProcessing(WebSocketMessage{id, msg->str});
|
||||
}
|
||||
else if ( msg->type == ix::WebSocketMessageType::Close ) {
|
||||
dispatcher->QueueForProcessing(WebSocketClose{id});
|
||||
auto& ci = msg->closeInfo;
|
||||
dispatcher->QueueForProcessing(WebSocketClose{id, ci.code, std::move(ci.reason)});
|
||||
}
|
||||
else if ( msg->type == ix::WebSocketMessageType::Error ) {
|
||||
dispatcher->QueueForProcessing(WebSocketClose{id});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue