mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Call reconnect() when a ping doesnt arrive in expected time
This commit is contained in:
parent
89f3fb71c7
commit
6451fe1408
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ class @Cable
|
|||
pingReceived: (timestamp) =>
|
||||
if @lastPingTime? and (timestamp - @lastPingTime) > @PING_STALE_INTERVAL
|
||||
console.log "Websocket connection is stale. Reconnecting.."
|
||||
@connection?.close()
|
||||
@reconnect()
|
||||
else
|
||||
@startWaitingForPing()
|
||||
@lastPingTime = timestamp
|
||||
|
|
Loading…
Reference in a new issue