-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Use async-websocket instead of celluloid-io. #75
Conversation
388d3d6
to
132b871
Compare
It looks good. Can you explain in layman's terms how I can run this to reproduce the failure you are seeing? |
|
Once you close the driver, I don't think you can expect to see any further events. WDYT? |
Correct, the driver should exit |
Can confirm with some logs that the ping thread correctly calls
@ioquatix for Celluloid we used for abort the connection with a |
Where is the code for the ping thread? |
My apologies but slack-ruby/slack-ruby-client#222 might be the first thing to check. |
Thanks for this @ioquatix, dblock/slack-ruby-client@f2062ec, testing. |
377d0ac
to
3a76f6a
Compare
Emitting a close event on the web socket similarly to what I was doing with Celluloid makes this ping situation work as before.
Without this the socket doesn't close and just sits there waiting for more. Closing the driver isn't enough. It sounds like this is related to slack-ruby/slack-ruby-client#222 (comment). Is the right(er) solution to call Or is the better solution to try and send a message over the websocket and expect the next read to return |
In theory you can just ignore the cancelled error, but I feel like it's the wrong approach. In almost every case where I've written network IO, the |
@ioquatix I mean in this case I am force-closing the socket per your recommendation in slack-ruby-client#222. Is that incorrect? |
I think it's the best option given the circumstances. |
No description provided.