fix incorrect closures with code 1011 Internal error (#450)
* fix incorrect closures with code 1011 Internal error * enable IXWebSocketCloseTest
This commit is contained in:
parent
dc7b986e10
commit
f184a7adef
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user