aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_cable/connection/heartbeat.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_cable/connection/heartbeat.rb')
-rw-r--r--lib/action_cable/connection/heartbeat.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/action_cable/connection/heartbeat.rb b/lib/action_cable/connection/heartbeat.rb
index e0f4a97f53..2918938ba5 100644
--- a/lib/action_cable/connection/heartbeat.rb
+++ b/lib/action_cable/connection/heartbeat.rb
@@ -5,7 +5,7 @@ module ActionCable
# disconnect.
class Heartbeat
BEAT_INTERVAL = 3
-
+
def initialize(connection)
@connection = connection
end
@@ -21,10 +21,10 @@ module ActionCable
private
attr_reader :connection
-
+
def beat
connection.transmit({ identifier: '_ping', message: Time.now.to_i }.to_json)
end
end
end
-end \ No newline at end of file
+end