IDEMPIERE-4625 Login Page refresh cause error message, randomly when slow db response (#506)

Fix wrong stop server push flow.
This commit is contained in:
hengsin 2021-01-06 17:46:56 +08:00 committed by GitHub
parent 248612e24d
commit bbb4c48b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -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);