Core/WorldSocket: Handle unhandled exceptions

Properly handle unhandled exceptions happening with malformed packets.
This commit is contained in:
Aokromes committed 2017-02-19 09:16:19 +01:00
1 parent ba553b5580
commit 1798c0a8f9
1 file changed
+2 -2
+2 -2
View File
@@ -352,7 +352,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
{
return HandlePing(packet) ? ReadDataHandlerResult::Ok : ReadDataHandlerResult::Error;
}
catch (ByteBufferPositionException const&)
catch (ByteBufferException const&)
{
}
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_PING", GetRemoteIpAddress().to_string().c_str());
@@ -374,7 +374,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
HandleAuthSession(packet);
return ReadDataHandlerResult::WaitingForQuery;
}
catch (ByteBufferPositionException const&)
catch (ByteBufferException const&)
{
}
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_AUTH_SESSION", GetRemoteIpAddress().to_string().c_str());