parent
3365facf9f
commit
26de9b9714
@ -1042,9 +1042,6 @@ namespace ix
|
||||
|
||||
if (_readyState == ReadyState::CLOSING || _readyState == ReadyState::CLOSED) return;
|
||||
|
||||
// connection is opened, so close without sending close frame
|
||||
if (_readyState == ReadyState::OPEN)
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_closeDataMutex);
|
||||
_closeCode = code;
|
||||
@ -1062,22 +1059,6 @@ namespace ix
|
||||
// wake up the poll, but do not close yet
|
||||
_socket->wakeUpFromPoll(Socket::kSendRequest);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_closeDataMutex);
|
||||
_closeCode = code;
|
||||
_closeReason = reason;
|
||||
_closeWireSize = closeWireSize;
|
||||
_closeRemote = remote;
|
||||
}
|
||||
|
||||
setReadyState(ReadyState::CLOSED);
|
||||
|
||||
// wake up the poll, and close
|
||||
_socket->wakeUpFromPoll(Socket::kCloseRequest);
|
||||
}
|
||||
}
|
||||
|
||||
size_t WebSocketTransport::bufferedAmount() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user