From da0015e062c046bc4bdde1ef2f48cf93ad97cc1a Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Thu, 16 Apr 2015 11:53:56 -0500 Subject: Revert "Ping pubsub every 2 minutes" This reverts commit 702c919b27940d5b46d653d31a89daf2efa674d0. --- lib/action_cable/server.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/action_cable') diff --git a/lib/action_cable/server.rb b/lib/action_cable/server.rb index f7399666bc..930deec1d7 100644 --- a/lib/action_cable/server.rb +++ b/lib/action_cable/server.rb @@ -1,7 +1,5 @@ module ActionCable class Server - PUBSUB_PING_TIMEOUT = 120 - cattr_accessor(:logger, instance_reader: true) { Rails.logger } attr_accessor :registered_channels, :redis_config @@ -26,7 +24,7 @@ module ActionCable end def pubsub - @pubsub ||= redis.pubsub.tap { |pb| add_pubsub_periodic_timer(pb) } + @pubsub ||= redis.pubsub end def redis @@ -73,12 +71,5 @@ module ActionCable @connections.map(&:statistics) end - protected - def add_pubsub_periodic_timer(ps) - @pubsub_periodic_timer ||= EventMachine.add_periodic_timer(PUBSUB_PING_TIMEOUT) do - logger.info "[ActionCable] Pubsub ping" - ps.ping - end - end end end -- cgit v1.2.3