IDEMPIERE-4676 Browser hangs after restarting iDempiere or refreshing ui.zk, on macos sometimes during work (#574)

Immediately treat jqxhr.status=0 as server not available doesn't work
well on firefox. With Firefox both stop of server and navigate away to
another site provide same jqxhr.onerror event and jqxhr.status of 0.
This commit is contained in:
hengsin 2021-02-10 02:10:54 +08:00 committed by GitHub
parent 91fb2dacb9
commit 3a1d53ea4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 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="202101290100"/>
<javascript-module name="jawwa.atmosphere" version="202102091500"/>
<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

@ -44,7 +44,7 @@
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 || jqxhr.status == 0) {
if (jqxhr.status == 404) {
me.failures = 3;
} else {
me.failures += 1;