Commit 66420962 authored by JC Brand's avatar JC Brand
parent 47e00ae0
......@@ -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;
});
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment