diff --git a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml
index 48dd2b0364..01c88c10cd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml
+++ b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml
@@ -45,7 +45,7 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
-
+
diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js
index 54e42e624d..75ed4421f7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js
+++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js
@@ -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 {