Replaced try/catch by non-throwing socket.close()

This commit is contained in:
leak
2014-07-20 14:37:57 +02:00
parent 0c99667887
commit 87db1ae44f

View File

@@ -78,11 +78,8 @@ void WorldSocket::AsyncReadHeader()
else
{
// _socket.is_open() till returns true even after calling close()
try
{
_socket.close();
}
catch (std::exception const& /*ex*/) { }
boost::system::error_code socketError;
_socket.close(socketError);
}
});
}
@@ -158,11 +155,8 @@ void WorldSocket::AsyncReadData(size_t dataSize)
else
{
// _socket.is_open() till returns true even after calling close()
try
{
_socket.close();
}
catch (std::exception const& /*ex*/) {}
boost::system::error_code socketError;
_socket.close(socketError);
}
});
}