Repository: qpid-jms-amqp-0-x
Updated Branches:
  refs/heads/master ffa282d5e -> 83dd606e3


QPID-8018: [Java Client, AMQP 0-x] Clarify error message when connection times 
out.


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/commit/83dd606e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/tree/83dd606e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/diff/83dd606e

Branch: refs/heads/master
Commit: 83dd606e3ce9e035f551f004ada071336f3efb65
Parents: ffa282d
Author: Lorenz Quack <lqu...@apache.org>
Authored: Wed Nov 8 16:34:17 2017 +0000
Committer: Lorenz Quack <lqu...@apache.org>
Committed: Wed Nov 8 16:34:17 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/qpid/client/util/BlockingWaiter.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/blob/83dd606e/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java
----------------------------------------------------------------------
diff --git 
a/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java 
b/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java
index c3ba234..c977854 100644
--- a/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java
+++ b/client/src/main/java/org/apache/qpid/client/util/BlockingWaiter.java
@@ -28,8 +28,8 @@ import java.util.concurrent.locks.ReentrantLock;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.qpid.QpidException;
 import org.apache.qpid.AMQTimeoutException;
+import org.apache.qpid.QpidException;
 import org.apache.qpid.client.failover.FailoverException;
 
 /**
@@ -167,7 +167,11 @@ public abstract class BlockingWaiter<T>
 
                         if (nanoTimeout <= 0 && !_ready && _error == null)
                         {
-                            _error = new AMQTimeoutException("Server did not 
respond in a timely fashion", null);
+                            final String errorMsg = String.format(
+                                    "Waiting for receive timed out after %d 
ms. Possible reasons include JVM garbage"
+                                    + " collection, slow connection, busy 
broker, ...",
+                                    timeout);
+                            _error = new AMQTimeoutException(errorMsg, null);
                             _ready = true;
                         }
                     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to