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:
parent
fd3fef9e7b
commit
3d70b5dd63
|
@ -45,7 +45,7 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
|
||||||
</component>
|
</component>
|
||||||
|
|
||||||
<javascript-module name="org.idempiere.websocket" version="202011211500"/>
|
<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-module name="adempiere.local.storage" version="202011151100"/>
|
||||||
<javascript-moudle name="html2canvas" version="1.0.0.rc7"/>
|
<javascript-moudle name="html2canvas" version="1.0.0.rc7"/>
|
||||||
<javascript-module name="org.idempiere.commons" version="202012030330"/>
|
<javascript-module name="org.idempiere.commons" version="202012030330"/>
|
||||||
|
|
|
@ -40,13 +40,15 @@
|
||||||
var me = this;
|
var me = this;
|
||||||
this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) {
|
this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) {
|
||||||
if (me.trace)
|
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 (textStatus != "timeout" && textStatus != "abort" && errorThrown != "SessionNotFound") {
|
||||||
if (typeof console == "object") {
|
console.error("error: " + textStatus + " errorThrown: " + errorThrown + " status: " + jqxhr.status);
|
||||||
console.error(textStatus);
|
//stop immediately if server is not reachable
|
||||||
console.error(errorThrown);
|
if (jqxhr.status == 404 || jqxhr.status == 0) {
|
||||||
|
me.failures = 3;
|
||||||
|
} else {
|
||||||
|
me.failures += 1;
|
||||||
}
|
}
|
||||||
me.failures += 1;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.ajaxOptions.success = function(data) {
|
this.ajaxOptions.success = function(data) {
|
||||||
|
@ -69,7 +71,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
_schedule: function() {
|
_schedule: function() {
|
||||||
if (this.failures < 20) {
|
if (this.failures < 3) {
|
||||||
this._req = null;
|
this._req = null;
|
||||||
setTimeout(this.proxy(this._send), this.delay);
|
setTimeout(this.proxy(this._send), this.delay);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue