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
+5 -2

No files matched your search

+4
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();
if (_readyState != ReadyState::CLOSING)
{
setReadyState(ReadyState::CLOSED);
}
return false;
}
else
+1 -2
View File
@@ -24,14 +24,13 @@ set (TEST_TARGET_NAMES
# IXWebSocketBroadcastTest ## FIXME was depending on cobra / take a broadcast server from ws
IXStrCaseCompareTest
IXExponentialBackoffTest
IXWebSocketCloseTest
)
# Some unittest don't work on windows yet
# Windows without TLS does not have hmac yet
if (UNIX)
list(APPEND TEST_TARGET_NAMES
IXWebSocketCloseTest
# Fail on Windows in CI probably because the pathing is wrong and
# some resource files cannot be found
IXHttpServerTest