Again fix for FELIX-3426 UPnP Plugin device tracking is error-prone
https://issues.apache.org/jira/browse/FELIX-3426

Actually the size would never be 0, the reason is that the service that is 'beeing removed' is still in the tracker. So when the tracker size is 1, we should unregister the plugin.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1309293 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java b/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java
index 65b5d4d..f4ceae8 100644
--- a/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java
+++ b/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java
@@ -106,7 +106,7 @@
                 controller.removedService(reference, service);

         }

 

-        if (tracker.size() == 0 && plugin != null)

+        if (tracker.size() <= 1 && plugin != null)

         {

             plugin.unregister();

             this.plugin = null;