-
Notifications
You must be signed in to change notification settings - Fork 61
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
Implement reconnect when connection closed by Pusher #23
Comments
We currently use the ruby client for our command line client only, so we don't have any advanced monitoring in place and no long running processes. I have seen it hang, usually after I lose my network connection (for instance, when putting computer to sleep but having the monitor run). |
@rkh makes sense, explains why this isn't a biggie for you guys :) |
+1, there should be a way to monitor the connection and auto reconnect on connection errors. |
👍 |
Has anyone found where exactly in the code of pusher-ruby-client this |
These is a design issue where https://github.com/pusher/pusher-ruby-client/blob/master/lib/pusher-client/websocket.rb#L89 will ignore IO errors and return an empty list of messages. https://github.com/pusher/pusher-ruby-client/blob/master/lib/pusher-client/socket.rb#L206 who consumes them will see that there is no message and go for the next iteration of the loop. Somewhere around there we should probably emit a "pusher:connection_disconnected" event and let the user deal with the reconnection strategy that he wants to use. |
I am getting infinite loop of EOF logs from pusher. Not sure under which circumstance it occurs. When will the socket connection throw EOF error? |
I have started a rewrite last week but it's low priority, I don't know how long it will take to release it. |
+1, any update on this? |
Currently if Pusher closes the socket, the client will infinite loop since it rescues IOError, which is an ancestor of EOFError.
I imagine you'll see this happening every few weeks on average - do you see this @rkh @pat?
The text was updated successfully, but these errors were encountered: