Skip to content

Commit

Permalink
Merge pull request #1466 from Atmosphere/atmosphere-2.1.x
Browse files Browse the repository at this point in the history
Atmosphere 2.1.x
  • Loading branch information
jfarcand committed Feb 7, 2014
2 parents 0e0c723 + f7c6100 commit 2d97861
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,17 @@ public AtmosphereResource notifyListeners(AtmosphereResourceEvent event) {
action().type(Action.TYPE.CREATED);
}
} catch (Throwable t) {
logger.debug("Listener error {}", t);
AtmosphereResourceEventImpl.class.cast(event).setThrowable(t);
if (event.isSuspended()) {
logger.warn("Exception during suspend() operation {}", t);
broadcaster.removeAtmosphereResource(this);
if (config.getBroadcasterFactory().getDefault() != null) {
config.getBroadcasterFactory().getDefault().removeAllAtmosphereResource(this);
}
} else {
logger.debug("Listener error {}", t);
}

try {
onThrowable(event);
} catch (Throwable t2) {
Expand Down Expand Up @@ -724,11 +733,8 @@ public void _destroy() {
try {
removeEventListeners();
if (!isCancelled.get()) {
try {
getBroadcaster(false).removeAtmosphereResource(this);
} catch (IllegalStateException ex) {
logger.trace(ex.getMessage(), ex);
}
if (broadcaster != null) broadcaster.removeAtmosphereResource(this);

if (config.getBroadcasterFactory().getDefault() != null) {
config.getBroadcasterFactory().getDefault().removeAllAtmosphereResource(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class ModuleDetection {
modules.put("wicket", "org.apache.wicket.atmosphere.EventBus");
modules.put("scalatra", "org.scalatra.ScalatraServlet");
modules.put("eventPush", "org.grails.plugin.platform.events.push.EventsPushHandler");
modules.put("nettosphere", "org.atmosphere.nettosphere.BridgeRuntime");

}

Expand Down

0 comments on commit 2d97861

Please sign in to comment.