aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2015-04-03 09:32:22 -0500
committerPratik Naik <pratiknaik@gmail.com>2015-04-03 09:32:22 -0500
commitbdbbe18f3cc527b121bbb2f402898caf4c2fbb15 (patch)
tree6eacdbbb382c05fd19d147e5f1e596579a061921
parentf29a14207aa3084cb2f0a73cb5672729aa0c6d62 (diff)
downloadrails-bdbbe18f3cc527b121bbb2f402898caf4c2fbb15.tar.gz
rails-bdbbe18f3cc527b121bbb2f402898caf4c2fbb15.tar.bz2
rails-bdbbe18f3cc527b121bbb2f402898caf4c2fbb15.zip
Clear ping wait timeout when removing the connection
-rw-r--r--lib/assets/javascripts/cable.js.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/assets/javascripts/cable.js.coffee b/lib/assets/javascripts/cable.js.coffee
index 46cbf7bff0..345771dd1f 100644
--- a/lib/assets/javascripts/cable.js.coffee
+++ b/lib/assets/javascripts/cable.js.coffee
@@ -49,7 +49,6 @@ class @Cable
reconnect: =>
@removeExistingConnection()
- @clearPingWaitTimeout()
@resetPingTime()
@disconnected()
@@ -60,6 +59,8 @@ class @Cable
removeExistingConnection: =>
if @connection?
+ @clearPingWaitTimeout()
+
@connection.onclose = -> # no-op
@connection.onerror = -> # no-op
@connection.close()