We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 474dfff commit 422fe98Copy full SHA for 422fe98
src/push.js
@@ -15,7 +15,9 @@ function Push(options) {
15
16
Push.prototype.checkoutPing = function() {
17
var _this = this;
18
- setTimeout(function () {
+ _this.checkoutPingTimer && clearTimeout(_this.checkoutPingTimer);
19
+ _this.checkoutPingTimer = setTimeout(function () {
20
+ _this.checkoutPingTimer = 0;
21
if (_this.connection.state === 'connected') {
22
_this.connection.send('{"event":"pusher:ping","data":{}}');
23
if (_this.pingTimeoutTimer) {
@@ -741,4 +743,4 @@ function formatParams(data){
741
743
arr.push(encodeURIComponent(name)+'='+encodeURIComponent(data[name]));
742
744
}
745
return arr.join('&');
-}
746
+}
0 commit comments