Closed b4stien closed 8 years ago
Interesting. For both of these cases we trigger onFailure
with the appropriate exception. I presume you're saying that we should instead be calling onClose
on the listener and sending them in a close frame back to the server.
The spec is pretty clear on this. Working on it.
As per RFC 6455, status code 1005 or 1006 should be used when the websocket abnormally closed (ref: https://tools.ietf.org/html/rfc6455#section-7.1.5 and https://tools.ietf.org/html/rfc6455#section-7.4.1).
1006 in particular would be handy to detect that the network (or the server on the other side) crashed.