You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2013/01/11 08:52:46 UTC
git commit: WICKET-4965: Fix NPE when stopping the container
Updated Branches:
refs/heads/master a4d76de8b -> a33cc473e
WICKET-4965: Fix NPE when stopping the container
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a33cc473
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a33cc473
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a33cc473
Branch: refs/heads/master
Commit: a33cc473e3ff675b28ce341a2513ba1165f6c91a
Parents: a4d76de
Author: Emond Papegaaij <em...@topicus.nl>
Authored: Fri Jan 11 08:44:39 2013 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Fri Jan 11 08:52:23 2013 +0100
----------------------------------------------------------------------
.../wicket/atmosphere/AtmosphereBehavior.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/a33cc473/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java
index 87e47b2..862c300 100644
--- a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java
+++ b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/AtmosphereBehavior.java
@@ -179,7 +179,12 @@ public class AtmosphereBehavior extends Behavior
log.info(String.format("%s connection dropped from ip %s:%s", transport == null
? "websocket" : transport, req.getRemoteAddr(), req.getRemotePort()));
}
- findEventBus().unregisterConnection(event.getResource().uuid());
+ // It is possible that the application has already been destroyed, in which case
+ // unregistration is no longer needed
+ if (Application.get(applicationKey) != null)
+ {
+ findEventBus().unregisterConnection(event.getResource().uuid());
+ }
}
@Override