aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2015-04-09 17:16:50 -0500
committerPratik Naik <pratiknaik@gmail.com>2015-04-09 17:16:50 -0500
commita29034e47c45b6bb4ab4c4c06f11fe440b35f10f (patch)
treec299d68f6c36279fca6d3212eefd1f70f7929a68 /lib
parent662c064334638cfb783e2588c64342fe753f8c63 (diff)
downloadrails-a29034e47c45b6bb4ab4c4c06f11fe440b35f10f.tar.gz
rails-a29034e47c45b6bb4ab4c4c06f11fe440b35f10f.tar.bz2
rails-a29034e47c45b6bb4ab4c4c06f11fe440b35f10f.zip
Better method names
Diffstat (limited to 'lib')
-rw-r--r--lib/action_cable/connection/base.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb
index 65e85ed114..b2d758a124 100644
--- a/lib/action_cable/connection/base.rb
+++ b/lib/action_cable/connection/base.rb
@@ -26,7 +26,7 @@ module ActionCable
@websocket.on(:open) do |event|
broadcast_ping_timestamp
@ping_timer = EventMachine.add_periodic_timer(PING_INTERVAL) { broadcast_ping_timestamp }
- worker_pool.async.invoke(self, :initialize_client)
+ worker_pool.async.invoke(self, :initialize_connection)
end
@websocket.on(:message) do |event|
@@ -44,7 +44,7 @@ module ActionCable
@websocket.on(:close) do |event|
logger.info "[ActionCable] #{finished_request_message}"
- worker_pool.async.invoke(self, :close_client_connection)
+ worker_pool.async.invoke(self, :on_connection_closed)
EventMachine.cancel_timer(@ping_timer) if @ping_timer
end
@@ -87,7 +87,7 @@ module ActionCable
end
private
- def initialize_client
+ def initialize_connection
connect if respond_to?(:connect)
register_connection
@@ -95,7 +95,7 @@ module ActionCable
worker_pool.async.invoke(self, :received_data, @pending_messages.shift) until @pending_messages.empty?
end
- def close_client_connection
+ def on_connection_closed
cleanup_subscriptions
cleanup_internal_redis_subscriptions
disconnect if respond_to?(:disconnect)