diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2015-10-09 09:09:24 -0500 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2015-10-09 09:09:24 -0500 |
commit | 5858bf3bec7d72361116e84d9bcde5daa5195ea2 (patch) | |
tree | c93c26f601d77b4da1bb4b95c63fa05a12ea9750 /lib/action_cable/channel | |
parent | 9ad20352e94f493be9a70e310104fb9932a2af2c (diff) | |
download | rails-5858bf3bec7d72361116e84d9bcde5daa5195ea2.tar.gz rails-5858bf3bec7d72361116e84d9bcde5daa5195ea2.tar.bz2 rails-5858bf3bec7d72361116e84d9bcde5daa5195ea2.zip |
Better schedule pubsub subscribe
Diffstat (limited to 'lib/action_cable/channel')
-rw-r--r-- | lib/action_cable/channel/streams.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/action_cable/channel/streams.rb b/lib/action_cable/channel/streams.rb index 2d1506ee98..9fffdf1789 100644 --- a/lib/action_cable/channel/streams.rb +++ b/lib/action_cable/channel/streams.rb @@ -72,7 +72,7 @@ module ActionCable callback ||= default_stream_callback(broadcasting) streams << [ broadcasting, callback ] - pubsub.subscribe broadcasting, &callback + EM.next_tick { pubsub.subscribe broadcasting, &callback } logger.info "#{self.class.name} is streaming from #{broadcasting}" end |