mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01: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
|
@ -356,7 +356,8 @@ void WebSocketEventDispatcher::Process(const WebSocketClose& close) {
|
|||
// should be the last event related to this WebSocket client.
|
||||
auto rec = zeek::cluster::detail::bif::make_endpoint_info(backend->NodeId(), wsc->getRemoteIp(),
|
||||
wsc->getRemotePort(), TRANSPORT_TCP);
|
||||
zeek::event_mgr.Enqueue(Cluster::websocket_client_lost, std::move(rec));
|
||||
zeek::event_mgr.Enqueue(Cluster::websocket_client_lost, std::move(rec), zeek::val_mgr->Count(close.code),
|
||||
zeek::make_intrusive<zeek::StringVal>(close.reason));
|
||||
}
|
||||
|
||||
clients.erase(it);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue