Author: ritchiem
Date: Wed Oct  3 08:26:10 2007
New Revision: 581627

URL: http://svn.apache.org/viewvc?rev=581627&view=rev
Log:
QPID-614 : Applied supplementary patch from Aidan Skinner.

Modified:
    
incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java

Modified: 
incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java?rev=581627&r1=581626&r2=581627&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
 (original)
+++ 
incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
 Wed Oct  3 08:26:10 2007
@@ -180,30 +180,32 @@
         {
             while (!_ready)
             {
-                if (timeout == -1)
-                {
-                    _receivedCondition.await();
-                }
-                else
-                {
-                    nanoTimeout = _receivedCondition.awaitNanos(nanoTimeout);
-
-                    if (nanoTimeout <= 0 && !_ready && _error == null)
+                try {
+                    if (timeout == -1)
                     {
-                        _error = new AMQTimeoutException("Server did not 
respond in a timely fashion");
-                        _ready = true;
+                        _receivedCondition.await();
                     }
+                    else
+                    {
+                        nanoTimeout = 
_receivedCondition.awaitNanos(nanoTimeout);
+
+                        if (nanoTimeout <= 0 && !_ready && _error == null)
+                        {
+                            _error = new AMQTimeoutException("Server did not 
respond in a timely fashion");
+                            _ready = true;
+                        }
+                    }
+                } 
+                catch (InterruptedException e)
+                {
+                    // IGNORE    -- //fixme this isn't ideal as being 
interrupted isn't equivellant to sucess
+                    // if (!_ready && timeout != -1)
+                    // {
+                    // _error = new AMQException("Server did not respond 
timely");
+                    // _ready = true;
+                    // }
                 }
             }
-        }
-        catch (InterruptedException e)
-        {
-            // IGNORE    -- //fixme this isn't ideal as being interrupted 
isn't equivellant to sucess
-            // if (!_ready && timeout != -1)
-            // {
-            // _error = new AMQException("Server did not respond timely");
-            // _ready = true;
-            // }
         }
         finally
         {


Reply via email to