Skip to content

Instantly share code, notes, and snippets.

@jfarcand
Created June 1, 2015 16:53
Show Gist options
  • Save jfarcand/72923f7b25264599785c to your computer and use it in GitHub Desktop.
Save jfarcand/72923f7b25264599785c to your computer and use it in GitHub Desktop.
--- a/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereResourceImpl.java
+++ b/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereResourceImpl.java
@@ -831,7 +831,9 @@ public class AtmosphereResourceImpl implements AtmosphereResource {
}
if (AtmosphereRequest.class.isAssignableFrom(req.getClass())) {
- AtmosphereRequest.class.cast(req).destroy();
+ if (closeOnCancel) {
+ AtmosphereRequest.class.cast(req).destroy();
+ }
}
event.destroy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment