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)
|
if (_readyState != ReadyState::CLOSING)
|
||||||
{
|
{
|
||||||
// send back the CLOSE frame
|
// send back the CLOSE frame
|
||||||
|
setReadyState(ReadyState::CLOSING);
|
||||||
sendCloseFrame(code, reason);
|
sendCloseFrame(code, reason);
|
||||||
|
|
||||||
wakeUpFromPoll(SelectInterrupt::kCloseRequest);
|
wakeUpFromPoll(SelectInterrupt::kCloseRequest);
|
||||||
@ -1072,7 +1073,10 @@ namespace ix
|
|||||||
else if (ret <= 0)
|
else if (ret <= 0)
|
||||||
{
|
{
|
||||||
closeSocket();
|
closeSocket();
|
||||||
setReadyState(ReadyState::CLOSED);
|
if (_readyState != ReadyState::CLOSING)
|
||||||
|
{
|
||||||
|
setReadyState(ReadyState::CLOSED);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -24,14 +24,13 @@ set (TEST_TARGET_NAMES
|
|||||||
# IXWebSocketBroadcastTest ## FIXME was depending on cobra / take a broadcast server from ws
|
# IXWebSocketBroadcastTest ## FIXME was depending on cobra / take a broadcast server from ws
|
||||||
IXStrCaseCompareTest
|
IXStrCaseCompareTest
|
||||||
IXExponentialBackoffTest
|
IXExponentialBackoffTest
|
||||||
|
IXWebSocketCloseTest
|
||||||
)
|
)
|
||||||
|
|
||||||
# Some unittest don't work on windows yet
|
# Some unittest don't work on windows yet
|
||||||
# Windows without TLS does not have hmac yet
|
# Windows without TLS does not have hmac yet
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
list(APPEND TEST_TARGET_NAMES
|
list(APPEND TEST_TARGET_NAMES
|
||||||
IXWebSocketCloseTest
|
|
||||||
|
|
||||||
# Fail on Windows in CI probably because the pathing is wrong and
|
# Fail on Windows in CI probably because the pathing is wrong and
|
||||||
# some resource files cannot be found
|
# some resource files cannot be found
|
||||||
IXHttpServerTest
|
IXHttpServerTest
|
||||||
|
Loading…
Reference in New Issue
Block a user