From 66420962f7f3c21fcd9b9defd37a20690e6f3d50 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 28 May 2015 10:58:25 +0200 Subject: [PATCH] Make sure the pong handler is always registered. https://github.com/jcbrand/converse.js/commit/47e00ae005fc4034836595d4267953b46a869cb7 --- converse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converse.js b/converse.js index c8cfacacc..3d401341c 100644 --- a/converse.js +++ b/converse.js @@ -750,8 +750,8 @@ }; this.registerPingHandler = function () { + this.registerPongHandler(); if (this.ping_interval > 0) { - this.registerPongHandler(); this.connection.addHandler(function () { /* Handler on each stanza, saves the received date * in order to ping only when needed. @@ -767,7 +767,7 @@ if ((now - this.lastStanzaDate)/1000 > this.ping_interval) { return this.ping(); } - return true; + return true; }); } };