fix close bug and tests : let poll do his job when closing (#79)

* let poll do his job when closing

* try fix test

* try fix test

* Update IXWebSocketTransport.cpp

* add log to find issue on CI

* add log to find issue on CI

* add log to find issue on CI

* add log to find issue on CI

* add log to find issue on CI

* change state immediately, and send close frame after

* add immediate close test

* disable test for windows
This commit is contained in:
Kumamon38
2019-05-21 18:34:08 +02:00
committed by Benjamin Sergeant
parent aa3f201ced
commit 3990d3bcbf
5 changed files with 107 additions and 38 deletions

View File

@ -293,8 +293,8 @@ namespace ix
break;
}
// We cannot enter poll which might block forever if we are stopping
if (_stop) break;
// We can avoid to poll if we want to stop and are not closing
if (_stop && !isClosing()) break;
// 2. Poll to see if there's any new data available
WebSocketTransport::PollResult pollResult = _ws.poll();