commit | 6aa7871bf4c15ae219ecc3a498128ba862a9a91e | [log] [tgz] |
---|---|---|
author | Valentin Pavlov Valchev <vvalchev@apache.org> | Wed Mar 31 12:17:51 2010 +0000 |
committer | Valentin Pavlov Valchev <vvalchev@apache.org> | Wed Mar 31 12:17:51 2010 +0000 |
tree | e24b98873e871f3a0fed17120eec9d48f75d9940 | |
parent | 79826c10099cb0350231a4b521a2b27fad07f926 [diff] |
fixed a small problem with unregistering the listener git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@929495 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java b/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java index c64cce0..402dfab 100644 --- a/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java +++ b/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/SessionObject.java
@@ -128,7 +128,18 @@ vars.clear(); if (reg != null) { - reg.unregister(); + try + { + reg.unregister(); + } + catch (Throwable t) + { + // When the bundle is stopped, the session object might remain hanging + // in the session, until it expires. After being stopped, the framework + // however will automatically destroy the registration. But after session + // expires this method will be called once again and will try to + // unregister the service. This will throw exception, that should be caught. + } reg = null; } return this;