sturdy-websocket
sturdy-websocket copied to clipboard
Close Event is never dispatched
I noticed that the onclose
handler that gets passed in via the options in the constructor is never called if the sturdyWebSocket.close()
method is called. After a quick look through the code, it looks like it is never dispatched. Should it be dispatched in the following line after calling ws.close()
?
https://github.com/dphilipson/sturdy-websocket/blob/5a130e437a92f648c1b5bfc5625e1e2e02058501/src/index.ts#L389