qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r758017 - /qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
Date Tue, 24 Mar 2009 20:59:04 GMT
Author: rajith
Date: Tue Mar 24 20:59:03 2009
New Revision: 758017

URL: http://svn.apache.org/viewvc?rev=758017&view=rev
Log:
This is a fix for QPID-1773

Modified:
    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/Session.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java?rev=758017&r1=758016&r2=758017&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 Tue Mar
24 20:59:03 2009
@@ -559,7 +559,7 @@
                 if (isFull(next))
                 {
                     Waiter w = new Waiter(commands, timeout);
-                    while (w.hasTime() && isFull(next))
+                    while (w.hasTime() && isFull(next) && state != CLOSED)
                     {
                         if (state == OPEN || state == RESUMING)
                         {
@@ -585,6 +585,19 @@
                     }
                 }
 
+                if (state == CLOSED)
+                {
+                    ExecutionException exc = getException();
+                    if (exc != null)
+                    {
+                        throw new SessionException(exc);
+                    }
+                    else
+                    {
+                        throw new SessionClosedException();
+                    }
+                }
+
                 if (isFull(next))
                 {
                     throw new SessionException("timed out waiting for completion");



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


Mime
View raw message