TheWebsocket.close() may not actually closed the websocket instantly, depending if its busy or not, it may stay sometime into ws.CLOSING state before switching toWebsocket.CLOSED.
While not causing any major issues, the deno test may file because the websockets from previous test may close into another test which cause failing steps without disable sanitizeOps/sanitizeResources
The
Websocket.close()
may not actually closed the websocket instantly, depending if its busy or not, it may stay sometime intows.CLOSING
state before switching toWebsocket.CLOSED
.While not causing any major issues, the deno test may file because the websockets from previous test may close into another test which cause failing steps without disable
sanitizeOps
/sanitizeResources
This currently use a deferred polyfill to track the actual state of the socket, which can be replaced by native code once https://github.com/tc39/proposal-promise-with-resolvers lands