activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1404271 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf: JmDNSFactory.java ZeroconfDiscoveryAgent.java
Date Wed, 31 Oct 2012 17:50:04 GMT
Author: gtully
Date: Wed Oct 31 17:50:03 2012
New Revision: 1404271

URL: http://svn.apache.org/viewvc?rev=1404271&view=rev
Log:
AMQ-4056 - ensure we do a close

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/JmDNSFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/ZeroconfDiscoveryAgent.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/JmDNSFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/JmDNSFactory.java?rev=1404271&r1=1404270&r2=1404271&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/JmDNSFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/JmDNSFactory.java
Wed Oct 31 17:50:03 2012
@@ -46,7 +46,7 @@ public final class JmDNSFactory {
         return tracker.jmDNS;
     }
 
-    static synchronized boolean onClose(InetAddress address, JmDNS dns) {
+    static synchronized boolean onClose(InetAddress address) {
         UsageTracker tracker = registry.get(address);
         if (tracker != null) {
             if (tracker.count.decrementAndGet() == 0) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/ZeroconfDiscoveryAgent.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/ZeroconfDiscoveryAgent.java?rev=1404271&r1=1404270&r2=1404271&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/ZeroconfDiscoveryAgent.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/zeroconf/ZeroconfDiscoveryAgent.java
Wed Oct 31 17:50:03 2012
@@ -92,7 +92,9 @@ public class ZeroconfDiscoveryAgent impl
             Thread thread = new Thread() {
                 public void run() {
                     try {
-                        JmDNSFactory.onClose(getLocalAddress(), closeTarget);
+                        if (JmDNSFactory.onClose(getLocalAddress())) {
+                            closeTarget.close();
+                        };
                     } catch (IOException e) {
                         LOG.debug("Error closing JmDNS " + getLocalhost() + ". This exception
will be ignored.", e);
                     }



Mime
View raw message