-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Implemented ping support for Celluloid and EventMachine. #236
Conversation
7f618f3
to
7c71e5c
Compare
Celluloid and EventMachine need to ensure that the timers are canceled on disconnect. This prevents the connection from being reestablished when the user intentionally closes it. This was achieved for module Slack
module RealTime
module Concurrency
module Async
class Reactor < ::Async::Reactor
def_delegators :@timers, :cancel
end
class Socket < Slack::RealTime::Socket
def disconnect!
super
@reactor.cancel
end
end
end
end
end
end |
We also have to implement a
|
Made some progress, but definitely could use help with the other TODOs, especially with proper tests that fail in Celluloid/EM and pass in async rn. |
@RodneyU215 if you want to help with this one, that'd be greatly appreciated, I won't have time for it for a while |
Thanks for the nudge! I'll work on it this week. |
…so that EventMachine continues running until disconnect! is called.
I tested this for EventMachine (via
I've implemented the Side note: |
Implementing restart_async for EventMachine
@RodneyU215 I think we should at least try supporting celluloid. While unmaintained there's a slew of bots out there using it, including my own :) I am going to merge this on green. How do I reproduce the problem with Celluloid? |
I merged this. Let's move from here. |
@dblock Thanks for moving things forward. The issue with Celluloid surfaced by just running the integration tests. Starting tomorrow I'll have some free time over the next couple weeks to dig deeper into that issue. |
@RodneyU215 Could really use some help here so we can get the next release out, haven't had much time to deal with Celluloid and EM, but would be happy to test on some production bots. Integration tests seem to pass, so... |
@dblock I believe EM is stable; I'm still working on verifying that Celluloid works as expected. I'm glad to hear that the integration tests are passing. This leads me to believe that it's likely an issue for me locally. I've got a few other things to get through at work before Friday but I'll continue working on it this weekend and follow up by Monday. |
Closes #223
@RodneyU215 Want to code review this?