You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by lq...@apache.org on 2017/11/08 16:34:36 UTC
qpid-jms-amqp-0-x git commit: QPID-8018: [Java Client,
AMQP 0-x] Clarify error message when connection times out.
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 <lq...@apache.org>
Authored: Wed Nov 8 16:34:17 2017 +0000
Committer: Lorenz Quack <lq...@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-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org