aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/action_cable/channel/base.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb
index 6060ccf681..c39c2fcf0b 100644
--- a/lib/action_cable/channel/base.rb
+++ b/lib/action_cable/channel/base.rb
@@ -31,6 +31,12 @@ module ActionCable
perform_connection
end
+ def perform_connection
+ logger.info "#{channel_name} connecting"
+ connect
+ run_subscribe_callbacks
+ end
+
def perform_action(data)
if authorized?
action = extract_action(data)
@@ -52,11 +58,6 @@ module ActionCable
logger.info "#{channel_name} disconnected"
end
- def perform_connection
- logger.info "#{channel_name} connecting"
- connect
- run_subscribe_callbacks
- end
protected
# Override in subclasses