Thanks
This commit is contained in:
Kumamon38 2019-05-21 21:14:58 +02:00 committed by Benjamin Sergeant
parent 3365facf9f
commit 26de9b9714

View File

@ -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
{