fix incorrect closures with code 1011 Internal error (#450)

* fix incorrect closures with code 1011 Internal error

* enable IXWebSocketCloseTest
This commit is contained in:
ouwou authored and GitHub committed 2023-03-29 20:45:29 -07:00
1 parent dc7b986e10
commit f184a7adef
2 files changed
+6 -3

No files matched your search

+5 -1
View File
@@ -700,6 +700,7 @@ namespace ix
if (_readyState != ReadyState::CLOSING)
{
// send back the CLOSE frame
setReadyState(ReadyState::CLOSING);
sendCloseFrame(code, reason);
wakeUpFromPoll(SelectInterrupt::kCloseRequest);
@@ -1072,7 +1073,10 @@ namespace ix
else if (ret <= 0)
{
closeSocket();
setReadyState(ReadyState::CLOSED);
if (_readyState != ReadyState::CLOSING)
{
setReadyState(ReadyState::CLOSED);
}
return false;
}
else