aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/server
diff options
context:
space:
mode:
authorMick Staugaard <mick@staugaard.com>2018-10-11 13:47:16 -0700
committerMick Staugaard <mick@staugaard.com>2018-12-05 10:40:29 -0800
commit58dbc1c2ed0e372d9cae4c9e3baebb679a726dc3 (patch)
tree9cfd085ce218a95879df56e8008d54978026e134 /actioncable/lib/action_cable/server
parentb802e08273f899d5f3b199f7c6a4f5d514c1b0e1 (diff)
downloadrails-58dbc1c2ed0e372d9cae4c9e3baebb679a726dc3.tar.gz
rails-58dbc1c2ed0e372d9cae4c9e3baebb679a726dc3.tar.bz2
rails-58dbc1c2ed0e372d9cae4c9e3baebb679a726dc3.zip
Stop trying to reconnect on unauthorized cable connections
Diffstat (limited to 'actioncable/lib/action_cable/server')
-rw-r--r--actioncable/lib/action_cable/server/base.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actioncable/lib/action_cable/server/base.rb b/actioncable/lib/action_cable/server/base.rb
index 1ee03f6dfc..2b9e1cba3b 100644
--- a/actioncable/lib/action_cable/server/base.rb
+++ b/actioncable/lib/action_cable/server/base.rb
@@ -36,7 +36,9 @@ module ActionCable
end
def restart
- connections.each(&:close)
+ connections.each do |connection|
+ connection.close(reason: ActionCable::INTERNAL[:disconnect_reasons][:server_restart])
+ end
@mutex.synchronize do
# Shutdown the worker pool