From bdbbe18f3cc527b121bbb2f402898caf4c2fbb15 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 3 Apr 2015 09:32:22 -0500 Subject: Clear ping wait timeout when removing the connection --- lib/assets/javascripts/cable.js.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- cgit v1.2.3