IDEMPIERE-5049 Zk Session and Desktop object not destroy immediately after logout (#1004)

added 5 minute timeout (browser default is 2) to comet resource
This commit is contained in:
hengsin 2021-11-25 20:46:11 +08:00 committed by GitHub
parent 6dbbb73a32
commit a31a6c61c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ package fi.jawsy.jawwa.zk.atmosphere;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.atmosphere.cpr.AtmosphereResource;
@ -267,7 +268,8 @@ public class AtmosphereServerPush implements ServerPush {
}
if (!resource.isSuspended()) {
resource.suspend();
//browser default timeout is 2 minutes
resource.suspend(5, TimeUnit.MINUTES);
}
AtmosphereResource oldResource = this.resource.getAndSet(resource);
if (oldResource != null) {