diff options
author | Thomas Watson | 2010-05-17 18:15:39 +0000 |
---|---|---|
committer | Thomas Watson | 2010-05-17 18:15:39 +0000 |
commit | 3ab1919987640f655f8b369bdd91718227dd1cbc (patch) | |
tree | 88382f729c5388d5ee389c86f98424d6dbef3f4e /bundles/org.eclipse.osgi | |
parent | e03e6e21214fbc7c956b819c8bd33915a2167319 (diff) | |
download | rt.equinox.framework-3ab1919987640f655f8b369bdd91718227dd1cbc.tar.gz rt.equinox.framework-3ab1919987640f655f8b369bdd91718227dd1cbc.tar.xz rt.equinox.framework-3ab1919987640f655f8b369bdd91718227dd1cbc.zip |
Bug 312917 - IllegalStateException on shutdownv20100517before_merge_Root_OSGI_R4_3_RIR3_6
Diffstat (limited to 'bundles/org.eclipse.osgi')
-rw-r--r-- | bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java index 0dbbfc17a..bb43b14ec 100644 --- a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java +++ b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java @@ -40,8 +40,16 @@ public abstract class ConsoleSession implements ServiceFactory { public final void close() { doClose(); ServiceRegistration current = sessionRegistration; - if (current != null) - current.unregister(); + if (current != null) { + sessionRegistration = null; + try { + current.unregister(); + } catch (IllegalStateException e) { + // This can happen if the service is in the process of being + // unregistered or if another thread unregistered the service. + // Ignoring the exception. + } + } } /** |