Skip to content

Commit

Permalink
IDEMPIERE-5049 Zk Session and Desktop object not destroy immediately …
Browse files Browse the repository at this point in the history
…after logout (#1004)

added 5 minute timeout (browser default is 2) to comet resource
  • Loading branch information
hengsin committed Nov 25, 2021
1 parent 6dbbb73 commit a31a6c6
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -22,6 +22,7 @@
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;
Expand Down Expand Up @@ -267,7 +268,8 @@ public void onRequest(AtmosphereResource resource) {
}

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) {
Expand Down

0 comments on commit a31a6c6

Please sign in to comment.