diff options
author | Matthew Draper <matthew@trebex.net> | 2016-01-14 15:55:41 +1030 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-01-18 18:59:00 -0500 |
commit | 2815db356977b506f63d155aecf71ee010a64c62 (patch) | |
tree | 6ac39a82985340ff7cea0b8a976e88799d895e24 /actioncable/lib/action_cable/channel | |
parent | 7b79ae0335b67377636cf2ba7be70a4119ca90cd (diff) | |
download | rails-2815db356977b506f63d155aecf71ee010a64c62.tar.gz rails-2815db356977b506f63d155aecf71ee010a64c62.tar.bz2 rails-2815db356977b506f63d155aecf71ee010a64c62.zip |
Pull the action methods directly onto the adapter
Diffstat (limited to 'actioncable/lib/action_cable/channel')
-rw-r--r-- | actioncable/lib/action_cable/channel/streams.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actioncable/lib/action_cable/channel/streams.rb b/actioncable/lib/action_cable/channel/streams.rb index b5ffa17f72..89dcbdfa27 100644 --- a/actioncable/lib/action_cable/channel/streams.rb +++ b/actioncable/lib/action_cable/channel/streams.rb @@ -76,10 +76,10 @@ module ActionCable streams << [ broadcasting, callback ] EM.next_tick do - pubsub.subscribe(broadcasting, &callback).callback do |reply| + adapter.subscribe(broadcasting, callback, lambda do |reply| transmit_subscription_confirmation logger.info "#{self.class.name} is streaming from #{broadcasting}" - end + end) end end @@ -92,13 +92,13 @@ module ActionCable def stop_all_streams streams.each do |broadcasting, callback| - pubsub.unsubscribe_proc broadcasting, callback + adapter.unsubscribe broadcasting, callback logger.info "#{self.class.name} stopped streaming from #{broadcasting}" end.clear end private - delegate :pubsub, to: :connection + delegate :adapter, to: :connection def streams @_streams ||= [] |