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:
leak
2014-07-19 21:59:17 +02:00
parent 16f375f397
commit b153e1a47f

View File

@@ -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*/) {}
}
});
}