Make sure the pong handler is always registered.

47e00ae005
This commit is contained in:
JC Brand 2015-05-28 10:58:25 +02:00
parent 47e00ae005
commit 66420962f7

View File

@ -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.