Fix crash in SocketEvents::ChangeEvents

refs #6109
This commit is contained in:
Gunnar Beutner 2015-02-17 13:21:43 +01:00
parent f57bd0b38c
commit 31786fdaa1
1 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,8 @@ void SocketEvents::Unregister(void)
void SocketEvents::ChangeEvents(int events)
{
ASSERT(m_FD != INVALID_SOCKET);
if (m_FD == INVALID_SOCKET)
BOOST_THROW_EXCEPTION(std::runtime_error("Tried to read/write from a closed socket."));
{
boost::mutex::scoped_lock lock(l_SocketIOMutex);