Fixed: Catch ESocket exceptions when disconnecting and log it

This commit is contained in:
kervala 2016-10-19 10:48:32 +02:00
parent 9666ed648b
commit 2a407b8c00

View file

@ -2756,7 +2756,16 @@ void CNetworkConnection::sendSystemDisconnection()
uint32 length = message.length(); uint32 length = message.length();
if (_Connection.connected()) if (_Connection.connected())
{
try
{
_Connection.send(message.buffer(), length); _Connection.send(message.buffer(), length);
}
catch (const ESocket &e)
{
nlwarning("Socket exception: %s", e.what());
}
}
//sendUDP (&(_Connection), message.buffer(), length); //sendUDP (&(_Connection), message.buffer(), length);
statsSend(length); statsSend(length);