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" : self.window.name },
+ { "command": "ping", "session": this.sessionID, "windowid" : window.name },
function(data) {
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.',
"command": "search",
"query": this.currQuery,
"session": this.sessionID,
- "windowid" : self.window.name
+ "windowid" : window.name
};
if (filter !== undefined)
var context = this;
var request = new pzHttpRequest(this.pz2String, this.errorHandler);
request.safeGet(
- { "command": "stat", "session": this.sessionID, "windowid" : self.window.name },
+ { "command": "stat", "session": this.sessionID, "windowid" : window.name },
function(data) {
if ( data.getElementsByTagName("stat") ) {
var activeClients =
"sort": this.currentSort,
"block": 1,
"type": this.showResponseType,
- "windowid" : self.window.name
+ "windowid" : window.name
},
function(data, type) {
var show = null;
"command": "record",
"session": this.sessionID,
"id": this.currRecID,
- "windowid" : self.window.name
+ "windowid" : window.name
};
this.currRecOffset = null;
"command": "termlist",
"session": this.sessionID,
"name": this.termKeys,
- "windowid" : self.window.name
+ "windowid" : window.name
},
function(data) {
if ( data.getElementsByTagName("termlist") ) {
var context = this;
var request = new pzHttpRequest(this.pz2String, this.errorHandler);
request.safeGet(
- { "command": "bytarget", "session": this.sessionID, "windowid" : self.window.name},
+ { "command": "bytarget", "session": this.sessionID, "windowid" : window.name},
function(data) {
if ( data.getElementsByTagName("status")[0]
.childNodes[0].nodeValue == "OK" ) {