From bbb4c48b671979e0b0335529653cffd5575eeec1 Mon Sep 17 00:00:00 2001 From: hengsin Date: Wed, 6 Jan 2021 17:46:56 +0800 Subject: [PATCH] IDEMPIERE-4625 Login Page refresh cause error message, randomly when slow db response (#506) Fix wrong stop server push flow. --- .../jawsy/jawwa/zk/atmosphere/AtmosphereServerPush.java | 9 +-------- 1 file changed, 1 insertion(+), 8 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 1c6ab7cb94..4f38055916 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 @@ -236,18 +236,11 @@ public class AtmosphereServerPush implements ServerPush { return; } - AtmosphereResource currentResource = this.resource.getAndSet(null); + this.resource.set(null); synchronized (schedules) { schedules.clear(); } - if (currentResource != null ) { - try { - currentResource.close(); - } catch (IOException e) { - } - } - if (Executions.getCurrent() != null) { if (log.isDebugEnabled()) log.debug("Stopping server push for " + desktop);