activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r597582 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
Date Fri, 23 Nov 2007 07:51:05 GMT
Author: rajdavies
Date: Thu Nov 22 23:51:02 2007
New Revision: 597582

URL: http://svn.apache.org/viewvc?rev=597582&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1491

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java?rev=597582&r1=597581&r2=597582&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
Thu Nov 22 23:51:02 2007
@@ -104,6 +104,7 @@
     private Map<String, Object> socketOptions;
     private Boolean keepAlive;
     private Boolean tcpNoDelay;
+    private Thread runnerThread;
 
     /**
      * Connect to a remote Node - e.g. a Broker
@@ -165,6 +166,7 @@
      */
     public void run() {
         LOG.trace("TCP consumer thread starting");
+        this.runnerThread=Thread.currentThread();
         try {
             while (!isStopped()) {
                 doRun();
@@ -436,7 +438,7 @@
     public void stop() throws Exception {
         super.stop();
         CountDownLatch countDownLatch = stoppedLatch.get();
-        if (countDownLatch != null) {
+        if (countDownLatch != null && Thread.currentThread() != this.runnerThread)
{
             countDownLatch.await();
         }
     }



Mime
View raw message