-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ws.on :close not always triggered #24
Comments
Monkey patch for those encountering this issue: class WebSocket::Client::Simple::Client
def sleep(*args)
close
end
end |
Open
@rubys This repository was moved ruby-jp/websocket-client-simple. If you still need this, make pull request or issue to ruby-jp/websocket-client-simple again, thx. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found two cases where ws.on :close is not triggered, both involving the server going down. First is with a em-websocket server, and the second is with a
secure: true
connection with a WebSocket-EventMachine-Server server.A possible fix is to replace
sleep 1
withclose
in client.rb.To reproduce, use the websocket-client-simple example with either the em-websocket example or with the WebSocket-EventMachine-Server example modified for TLS.
The text was updated successfully, but these errors were encountered: