mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Be sure to initialize @heartbeat_timer. Third time is a charm!
This commit is contained in:
parent
935d0450c0
commit
9ad20352e9
1 changed files with 2 additions and 2 deletions
|
@ -22,8 +22,8 @@ module ActionCable
|
|||
# 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.
|
||||
def setup_heartbeat_timer
|
||||
@heartbeat_timer ||= EM.next_tick do
|
||||
EventMachine.add_periodic_timer(BEAT_INTERVAL) do
|
||||
EM.next_tick do
|
||||
@heartbeat_timer ||= EventMachine.add_periodic_timer(BEAT_INTERVAL) do
|
||||
EM.next_tick { connections.map &:beat }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue