From 26f18f9c22683403f339412c949eac2773c33d67 Mon Sep 17 00:00:00 2001 From: hengsin Date: Sun, 16 Feb 2020 17:00:00 +0800 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-4154=20ServerPush=20Adjustments.=20In?= =?UTF-8?q?corporate=20suggestion=20from=20Martin=20Sch=C3=B6nbeck.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java b/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java index cd8f41fb93..ff7d397c87 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java +++ b/org.adempiere.ui.zk/WEB-INF/src/fi/jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java @@ -192,9 +192,11 @@ public class AtmosphereServerPush implements ServerPush { } if (!ok) { for(int i = 0; i < 3 && !ok; i++) { - try { - Thread.sleep(500); - } catch (InterruptedException e1) {} + for (int ii = 0; ii < 10 && schedules.size() > 0; ii++) { + try { + Thread.sleep(50); + } catch (InterruptedException e1) {} + } if (schedules.size() > 0) { try { ok = commitResponse();