mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
server: don't notify disconnections when stopping the server
This commit is contained in:
parent
2bff3798af
commit
a96da35f11
@ -193,9 +193,14 @@ void WSServer::onClose(connection_hdl hdl)
|
||||
_connectionProperties.erase(hdl);
|
||||
locker.unlock();
|
||||
|
||||
QString clientIp = getRemoteEndpoint(hdl);
|
||||
notifyDisconnection(clientIp);
|
||||
blog(LOG_INFO, "client %s disconnected", clientIp.toUtf8().constData());
|
||||
auto conn = _server.get_con_from_hdl(hdl);
|
||||
auto localCloseCode = conn->get_local_close_code();
|
||||
|
||||
if (localCloseCode != websocketpp::close::status::going_away) {
|
||||
QString clientIp = getRemoteEndpoint(hdl);
|
||||
notifyDisconnection(clientIp);
|
||||
blog(LOG_INFO, "client %s disconnected", clientIp.toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
||||
QString WSServer::getRemoteEndpoint(connection_hdl hdl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user