IDEMPIERE-5011 Intermittent web client error at Firefox (#943)
- Desktop cleanup: fix timing issue with redirect - index.zul: remove obsolete workaround for rmDesktop (desktop cleanup) - serverpush.js: remove unreliable immediate stop of serverpush
This commit is contained in:
parent
940586fa97
commit
fe2b0bb966
|
@ -45,7 +45,7 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
|
|||
</component>
|
||||
|
||||
<javascript-module name="org.idempiere.websocket" version="202011211500"/>
|
||||
<javascript-module name="jawwa.atmosphere" version="202102091500"/>
|
||||
<javascript-module name="jawwa.atmosphere" version="202110220730"/>
|
||||
<javascript-module name="adempiere.local.storage" version="202011151100"/>
|
||||
<javascript-moudle name="html2canvas" version="1.3.1"/>
|
||||
<javascript-module name="org.idempiere.commons" version="202107060204"/>
|
||||
|
|
|
@ -250,6 +250,10 @@ public class SessionContextListener implements ExecutionInit,
|
|||
}
|
||||
int AD_Session_ID = Env.getContextAsInt(Env.getCtx(), Env.AD_SESSION_ID);
|
||||
if (AD_Session_ID > 0) {
|
||||
|
||||
//sleep 1s to avoid timing issue with login and logout (both uses redirect call)
|
||||
Thread.sleep(1000);
|
||||
|
||||
String key = getSessionDesktopListKey(AD_Session_ID);
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> list = (List<String>) Env.getCtx().get(key);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
this.timeout = timeout;
|
||||
this.ajaxOptions.data = { dtid: this.desktop.id };
|
||||
this.ajaxOptions.timeout = this.timeout;
|
||||
this.ajaxOptions.url = zk.ajaxURI("/comet", {au: true,desktop:this.desktop.id,ignoreSession:false}),
|
||||
this.ajaxOptions.url = zk.ajaxURI("/comet", {au: true,desktop:this.desktop.id,ignoreSession:true}),
|
||||
this.trace = trace;
|
||||
var me = this;
|
||||
this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) {
|
||||
|
@ -43,15 +43,10 @@
|
|||
console.log("error: " + textStatus + " dtid: " + me.desktop.id + " errorThrown: " + errorThrown + " status: " + jqxhr.status);
|
||||
if (textStatus != "timeout" && textStatus != "abort" && errorThrown != "SessionNotFound") {
|
||||
console.error("error: " + textStatus + " errorThrown: " + errorThrown + " status: " + jqxhr.status);
|
||||
//stop immediately if server is not reachable
|
||||
if (jqxhr.status == 404) {
|
||||
me.failures = 3;
|
||||
} else {
|
||||
me.failures += 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ajaxOptions.success = function(data) {
|
||||
this.ajaxOptions.success = function() {
|
||||
if (me.trace)
|
||||
console.log("success" + " dtid: " + me.desktop.id);
|
||||
zAu.cmd0.echo(this.desktop);
|
||||
|
@ -72,8 +67,11 @@
|
|||
},
|
||||
_schedule: function() {
|
||||
if (this.failures < 3) {
|
||||
var d = this.delay;
|
||||
if (this._req && (this._req.status == 0 || this._req.status == 400))
|
||||
d = 500;
|
||||
this._req = null;
|
||||
setTimeout(this.proxy(this._send), this.delay);
|
||||
setTimeout(this.proxy(this._send), d);
|
||||
} else {
|
||||
this.stop();
|
||||
jawwa.atmosphere.serverNotAvailable();
|
||||
|
|
|
@ -74,28 +74,6 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
});
|
||||
});
|
||||
|
||||
zk.afterLoad(function() {
|
||||
jq(window).on("unload", function () {
|
||||
//rmDesktop not call in window.onbeforeunload (mount.js) when zk.confirmClose is not null
|
||||
if (!zk.ie && zk.confirmClose){
|
||||
rmDesktop();
|
||||
}
|
||||
});
|
||||
|
||||
//function rmDesktop duplicated from mount.js ( zk.jar 7.0.3 )
|
||||
function rmDesktop() {
|
||||
var bRmDesktop = !zk.opera && !zk.keepDesktop;
|
||||
if (bRmDesktop || zk.pfmeter) {
|
||||
try {
|
||||
var dts = zk.Desktop.all;
|
||||
for (var dtid in dts)
|
||||
zAu._rmDesktop(dts[dtid], !bRmDesktop);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
zk.afterLoad('zul.inp', function () {
|
||||
|
||||
// should filter out for only component inside standard window or component wish fire this event,
|
||||
|
|
Loading…
Reference in New Issue