aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-09-25 17:04:21 -0400
committerJon Moss <me@jonathanmoss.me>2016-10-02 08:45:38 -0400
commit35a497dc2960cf6b46b7c47853f095326123490c (patch)
tree4f50a82873de94212a7db9b1fc01785562d7711b /actioncable
parenta5dfba4135574db62fbf3cf71ea1fd953acb4768 (diff)
downloadrails-35a497dc2960cf6b46b7c47853f095326123490c.tar.gz
rails-35a497dc2960cf6b46b7c47853f095326123490c.tar.bz2
rails-35a497dc2960cf6b46b7c47853f095326123490c.zip
Move behavior to Server::Base, and flush pubsub
Diffstat (limited to 'actioncable')
-rw-r--r--actioncable/lib/action_cable/engine.rb1
-rw-r--r--actioncable/lib/action_cable/server/base.rb8
2 files changed, 6 insertions, 3 deletions
diff --git a/actioncable/lib/action_cable/engine.rb b/actioncable/lib/action_cable/engine.rb
index 77c358b640..4c5c975cd8 100644
--- a/actioncable/lib/action_cable/engine.rb
+++ b/actioncable/lib/action_cable/engine.rb
@@ -70,7 +70,6 @@ module ActionCable
app.reloader.before_class_unload do
ActionCable.server.restart
- ActionCable.server.pubsub.shutdown
end
end
end
diff --git a/actioncable/lib/action_cable/server/base.rb b/actioncable/lib/action_cable/server/base.rb
index 67ada7cc2e..419eccd73c 100644
--- a/actioncable/lib/action_cable/server/base.rb
+++ b/actioncable/lib/action_cable/server/base.rb
@@ -37,9 +37,13 @@ module ActionCable
connections.each(&:close)
@mutex.synchronize do
- worker_pool.halt if @worker_pool
-
+ # Shutdown the worker pool
+ @worker_pool.halt if @worker_pool
@worker_pool = nil
+
+ # Shutdown the pub/sub adapter
+ @pubsub.shutdown if @pubsub
+ @pubsub = nil
end
end