mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Fix terminate() being called on kicking a player (closing sockets twice is bad)
Also, Boost, why does your is_open() suck..
This commit is contained in:
@@ -77,7 +77,12 @@ void WorldSocket::AsyncReadHeader()
|
||||
}
|
||||
else
|
||||
{
|
||||
_socket.close();
|
||||
// _socket.is_open() till returns true even after calling close()
|
||||
try
|
||||
{
|
||||
_socket.close();
|
||||
}
|
||||
catch (std::exception const& /*ex*/) { }
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -152,7 +157,12 @@ void WorldSocket::AsyncReadData(size_t dataSize)
|
||||
}
|
||||
else
|
||||
{
|
||||
_socket.close();
|
||||
// _socket.is_open() till returns true even after calling close()
|
||||
try
|
||||
{
|
||||
_socket.close();
|
||||
}
|
||||
catch (std::exception const& /*ex*/) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user