IDEMPIERE-4676 Browser hangs after restarting iDempiere or refreshing… (#557)

* IDEMPIERE-4676 Browser hangs after restarting iDempiere or refreshing ui.zk, on macos sometimes during work

* IDEMPIERE-4678 Save log informing Notice created when background job

stop immediately when server is not reachable
This commit is contained in:
hengsin 2021-01-31 15:56:22 +08:00 committed by GitHub
parent fd3fef9e7b
commit 3d70b5dd63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -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="202101150800"/>
<javascript-module name="jawwa.atmosphere" version="202101290100"/>
<javascript-module name="adempiere.local.storage" version="202011151100"/>
<javascript-moudle name="html2canvas" version="1.0.0.rc7"/>
<javascript-module name="org.idempiere.commons" version="202012030330"/>

View File

@ -40,13 +40,15 @@
var me = this;
this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) {
if (me.trace)
console.log("error: " + textStatus + " dtid: " + me.desktop.id + " errorThrown: " + errorThrown);
console.log("error: " + textStatus + " dtid: " + me.desktop.id + " errorThrown: " + errorThrown + " status: " + jqxhr.status);
if (textStatus != "timeout" && textStatus != "abort" && errorThrown != "SessionNotFound") {
if (typeof console == "object") {
console.error(textStatus);
console.error(errorThrown);
console.error("error: " + textStatus + " errorThrown: " + errorThrown + " status: " + jqxhr.status);
//stop immediately if server is not reachable
if (jqxhr.status == 404 || jqxhr.status == 0) {
me.failures = 3;
} else {
me.failures += 1;
}
me.failures += 1;
}
};
this.ajaxOptions.success = function(data) {
@ -69,7 +71,7 @@
};
},
_schedule: function() {
if (this.failures < 20) {
if (this.failures < 3) {
this._req = null;
setTimeout(this.proxy(this._send), this.delay);
} else {