linux hangs when closing

This commit is contained in:
Benjamin Sergeant 2019-03-16 11:38:23 -07:00
parent 05f0045d5d
commit d77f6f5659

View File

@ -243,9 +243,15 @@ namespace ix
} }
else if (pollResult == PollResultType_CloseRequest) else if (pollResult == PollResultType_CloseRequest)
{ {
; _socket->close();
} }
// Avoid a race condition where we get stuck in select
// while closing.
if (_readyState == CLOSING)
{
_socket->close();
}
}, },
_heartBeatPeriod); _heartBeatPeriod);
} }