BetaRavener/upy-websocket-server

State is always 3

Closed this issue · 1 comments

I am running webSocket server on esp8266.
On browser I connected to it with javascript.
State of webSocket on esp8266 is always 3, so _check_socket_state closes it.
When closing tab with website, state changes to 4 which isn't listed here:
https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/readyState

When _check_socket_state check to 4 it doesn't react to closing webSocket in javascript.

It happens also with websocket_demo.py

It looks like the "PEER_CLOSED" state was changed from 3 to 4 since this was last udpated: micropython/micropython@29da9f0