this.currRecOffset = null;
//timers
+ this.pingTimer = null;
this.statTime = paramArray.stattime || 1000;
this.statTimer = null;
this.termTime = paramArray.termtime || 1000;
this.sessionID = null;
this.initStatusOK = false;
this.pingStatusOK = false;
+ clearTimeout(this.pingTimer);
}
this.searchStatusOK = false;
this.stop();
context.sessionID =
data.getElementsByTagName("session")[0]
.childNodes[0].nodeValue;
- setTimeout(
- function () {
- context.ping();
- },
- context.keepAlive
- );
+ context.pingTimer =
+ setTimeout(
+ function () {
+ context.ping();
+ },
+ context.keepAlive
+ );
if ( context.initCallback )
context.initCallback();
}
'Pz2.js: Ping not allowed (proxy mode) or session not initialized.'
);
var context = this;
+
+ clearTimeout(context.pingTimer);
+
var request = new pzHttpRequest(this.pz2String, this.errorHandler);
request.safeGet(
{ "command": "ping", "session": this.sessionID, "windowid" : window.name },
if ( data.getElementsByTagName("status")[0]
.childNodes[0].nodeValue == "OK" ) {
context.pingStatusOK = true;
- setTimeout(
- function () {
- context.ping();
- },
- context.keepAlive
- );
+ context.pingTimer =
+ setTimeout(
+ function () {
+ context.ping();
+ },
+ context.keepAlive
+ );
}
else
context.throwError('Ping failed. Malformed WS resonse.',