aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/connection
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-01-14 15:55:41 +1030
committerJon Moss <me@jonathanmoss.me>2016-01-18 18:59:00 -0500
commit2815db356977b506f63d155aecf71ee010a64c62 (patch)
tree6ac39a82985340ff7cea0b8a976e88799d895e24 /actioncable/lib/action_cable/connection
parent7b79ae0335b67377636cf2ba7be70a4119ca90cd (diff)
downloadrails-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/connection')
-rw-r--r--actioncable/lib/action_cable/connection/base.rb2
-rw-r--r--actioncable/lib/action_cable/connection/internal_channel.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actioncable/lib/action_cable/connection/base.rb b/actioncable/lib/action_cable/connection/base.rb
index bb8850aaa0..2d7f99b09a 100644
--- a/actioncable/lib/action_cable/connection/base.rb
+++ b/actioncable/lib/action_cable/connection/base.rb
@@ -49,7 +49,7 @@ module ActionCable
include Authorization
attr_reader :server, :env, :subscriptions, :logger
- delegate :worker_pool, :pubsub, to: :server
+ delegate :worker_pool, :adapter, to: :server
def initialize(server, env)
@server, @env = server, env
diff --git a/actioncable/lib/action_cable/connection/internal_channel.rb b/actioncable/lib/action_cable/connection/internal_channel.rb
index 63ba293877..c618e9d087 100644
--- a/actioncable/lib/action_cable/connection/internal_channel.rb
+++ b/actioncable/lib/action_cable/connection/internal_channel.rb
@@ -15,14 +15,14 @@ module ActionCable
@_internal_subscriptions ||= []
@_internal_subscriptions << [ internal_channel, callback ]
- EM.next_tick { pubsub.subscribe(internal_channel, &callback) }
+ EM.next_tick { adapter.subscribe(internal_channel, callback) }
logger.info "Registered connection (#{connection_identifier})"
end
end
def unsubscribe_from_internal_channel
if @_internal_subscriptions.present?
- @_internal_subscriptions.each { |channel, callback| EM.next_tick { pubsub.unsubscribe_proc(channel, callback) } }
+ @_internal_subscriptions.each { |channel, callback| EM.next_tick { adapter.unsubscribe(channel, callback) } }
end
end