ws
ws copied to clipboard
expose close callback
You have a .close(code, data)
method here:
https://github.com/websockets/ws/blob/master/lib/WebSocket.js#L100
But you don't expose the callback here: https://github.com/websockets/ws/blob/master/lib/WebSocket.js#L121
I patched it such that if the callback is supplied it uses the callback for error instead of emitting.
https://github.com/websockets/ws/pull/614
Your pull request is failing the code checks. You'll want to update it to keep from failing. It will hopefully get merged after that?
It`s my problem