diff options
Diffstat (limited to 'lib/assets')
-rw-r--r-- | lib/assets/javascripts/cable/connection_monitor.js.coffee | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/assets/javascripts/cable/connection_monitor.js.coffee b/lib/assets/javascripts/cable/connection_monitor.js.coffee index 5573ea5a77..60e14b51ad 100644 --- a/lib/assets/javascripts/cable/connection_monitor.js.coffee +++ b/lib/assets/javascripts/cable/connection_monitor.js.coffee @@ -19,6 +19,13 @@ class Cable.ConnectionMonitor @reset() @pingedAt = now() + disconnected: -> + if @reconnectAttempts is 0 + @reconnectAttempts += 1 + setTimeout => + @consumer.connection.open() + , 200 + received: -> @pingedAt = now() |