1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Document heartbeat purpose

This commit is contained in:
David Heinemeier Hansson 2015-07-07 22:33:48 +02:00
parent a2c08e78e1
commit e3bf82625e

View file

@ -1,5 +1,8 @@
module ActionCable
module Connection
# Websocket connection implementations differ on when they'll mark a connection as stale. We basically never want a connection to go stale, as you
# then can't rely on being able to receive and send to it. So there's a 3 second heartbeat running on all connections. If the beat fails, we automatically
# disconnect.
class Heartbeat
BEAT_INTERVAL = 3