qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r748594 - in /qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport: Connection.java Session.java
Date Fri, 27 Feb 2009 17:01:26 GMT
Author: rhs
Date: Fri Feb 27 17:01:26 2009
New Revision: 748594

URL: http://svn.apache.org/viewvc?rev=748594&view=rev
Log:
QPID-1701: fixed potential deadlock on connection close

Modified:
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java

Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java?rev=748594&r1=748593&r2=748594&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java Fri
Feb 27 17:01:26 2009
@@ -74,7 +74,7 @@
     final private Map<Integer,Session> channels = new HashMap<Integer,Session>();
 
     private State state = NEW;
-    private Object lock = new Object();
+    final private Object lock = new Object();
     private long timeout = 60000;
     private ConnectionListener listener = new DefaultConnectionListener();
     private ConnectionException error = null;

Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java?rev=748594&r1=748593&r2=748594&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java Fri Feb
27 17:01:26 2009
@@ -854,9 +854,9 @@
             {
                 throw new SessionException("close() timed out");
             }
-
-            connection.removeSession(this);
         }
+
+        connection.removeSession(this);
     }
 
     public void exception(Throwable t)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message