activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1186539 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java
Date Wed, 19 Oct 2011 22:26:07 GMT
Author: gtully
Date: Wed Oct 19 22:26:07 2011
New Revision: 1186539

URL: http://svn.apache.org/viewvc?rev=1186539&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3481 - check for tryLock success before unlock

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java?rev=1186539&r1=1186538&r2=1186539&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java
Wed Oct 19 22:26:07 2011
@@ -153,7 +153,9 @@ public abstract class AbstractInactivity
                         } catch (IOException e) {
                             onException(e);
                         } finally {
-                            sendLock.writeLock().unlock();
+                             if (sendLock.writeLock().isHeldByCurrentThread()) {
+                                sendLock.writeLock().unlock();
+                             }
                         }
                     }
                 };



Mime
View raw message