Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const doCallBack = (err, ret) => {
if (!callbackCall) {
console.trace('imapAccountTest doCallBack');
saveLog(`imapAccountTest doing callback err [${err && err.messgae ? err.messgae : `undefine `}] ret [${ret ? ret : 'undefine'}]`);
callbackCall = true;
timers_1.clearTimeout(timeout);
return CallBack(err, ret);
}
};
let rImap = new qtGateImapRead(IMapConnect, listenFolder, false, mail => {
close() {
if (this.connectTimeout) {
Timers.clearTimeout(this.connectTimeout);
this.connectTimeout = null;
}
this._closing = true;
this.stream.end();
this.addCommand = this._addCommandClosedState;
}
const doCallBack = (err, ret) => {
if (!callbackCall) {
saveLog(`imapAccountTest doing callback err [${err && err.messgae ? err.messgae : `undefine `}] ret [${ret ? ret : 'undefine'}]`);
callbackCall = true;
timers_1.clearTimeout(timeout);
return CallBack(err, ret);
}
};
let rImap = new qtGateImapRead(IMapConnect, listenFolder, false, mail => {