aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/server.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2015-04-14 13:21:26 -0500
committerPratik Naik <pratiknaik@gmail.com>2015-04-14 13:21:26 -0500
commit155db8120811b89624fb7e657818eb32ed07301a (patch)
treeae2d81e1650d4b3f25e1d488a03f30241e2b0e58 /lib/action_cable/server.rb
parent5743cf30ff7714c7aa83133b350af22840473733 (diff)
downloadrails-155db8120811b89624fb7e657818eb32ed07301a.tar.gz
rails-155db8120811b89624fb7e657818eb32ed07301a.tar.bz2
rails-155db8120811b89624fb7e657818eb32ed07301a.zip
Revert "Remove all the existing connections on redis reconnect"
This reverts commit 4ac6cfefbb84a6b6ae095c20e990e5807caa9105.
Diffstat (limited to 'lib/action_cable/server.rb')
-rw-r--r--lib/action_cable/server.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/action_cable/server.rb b/lib/action_cable/server.rb
index 70b0610e92..1780e0c028 100644
--- a/lib/action_cable/server.rb
+++ b/lib/action_cable/server.rb
@@ -24,18 +24,7 @@ module ActionCable
end
def pubsub
- @pubsub ||= redis.pubsub
- end
-
- def redis
- @redis ||= begin
- redis = EM::Hiredis.connect(@redis_config[:url])
- redis.on(:reconnected) do
- logger.info "[ActionCable] Redis reconnected. Closing all the open connections."
- @connections.map &:close_connection
- end
- redis
- end
+ @pubsub ||= EM::Hiredis.connect(@redis_config[:url]).pubsub
end
def threaded_redis