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,10 +193,15 @@ void WSServer::onClose(connection_hdl hdl)
|
|||||||
_connectionProperties.erase(hdl);
|
_connectionProperties.erase(hdl);
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
|
|
||||||
|
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);
|
QString clientIp = getRemoteEndpoint(hdl);
|
||||||
notifyDisconnection(clientIp);
|
notifyDisconnection(clientIp);
|
||||||
blog(LOG_INFO, "client %s disconnected", clientIp.toUtf8().constData());
|
blog(LOG_INFO, "client %s disconnected", clientIp.toUtf8().constData());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString WSServer::getRemoteEndpoint(connection_hdl hdl)
|
QString WSServer::getRemoteEndpoint(connection_hdl hdl)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user