The local variable timeout will make clearTimeout(timeout) fail, since it's value will be undefined.
When the server close the socket, the clearTimeout(timeout) which in the ws.onclose callback function will not work correctly, and this suppose to be a bug I think.
The local variable
timeout
will makeclearTimeout(timeout)
fail, since it's value will be undefined.When the server close the socket, the
clearTimeout(timeout)
which in thews.onclose
callback function will not work correctly, and this suppose to be a bug I think.