Author: vvalchev
Date: Wed Apr  4 09:01:21 2012
New Revision: 1309293

URL: http://svn.apache.org/viewvc?rev=1309293&view=rev
Log:
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.

Modified:
    
felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java

Modified: 
felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java?rev=1309293&r1=1309292&r2=1309293&view=diff
==============================================================================
--- 
felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java
 (original)
+++ 
felix/trunk/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/Activator.java
 Wed Apr  4 09:01:21 2012
@@ -106,7 +106,7 @@ public class Activator implements Bundle
                 controller.removedService(reference, service);
         }
 
-        if (tracker.size() == 0 && plugin != null)
+        if (tracker.size() <= 1 && plugin != null)
         {
             plugin.unregister();
             this.plugin = null;


Reply via email to