diff options
author | Keith Wall <kwall@apache.org> | 2015-01-29 22:13:14 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2015-01-29 22:13:14 +0000 |
commit | 54b214dc8fd8087466cec5ee2dadaa60e797a49c (patch) | |
tree | 949ad6dc1a16eb7445ed53274acdc6919a353b21 /qpid/java/common | |
parent | b0b8d4f3dd7e0fd371e9e94499776b10b7918499 (diff) | |
download | qpid-python-54b214dc8fd8087466cec5ee2dadaa60e797a49c.tar.gz |
QPID-6350: [Java Client] Preserve original connection exception
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1655877 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common')
-rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java | 10 | ||||
-rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java index 890aeda11b..245f12ad0b 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java @@ -537,16 +537,16 @@ public class Connection extends ConnectionInvoker connectionLost.set(true); synchronized (lock) { - if(log.isDebugEnabled()) - { - log.debug("exception: %s state : %s", e.getMessage(), state); - } + log.error(e, "exception: %s", e.getMessage()); switch (state) { case OPENING: case CLOSING: - error = e; + if (error == null) + { + error = e; + } lock.notifyAll(); return; } diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java index 1bbf166d82..8e1395aa83 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java @@ -187,7 +187,10 @@ public class SSLReceiver implements Receiver<ByteBuffer> } catch(SSLException e) { - log.error(e, "Error caught in SSLReceiver"); + if (log.isDebugEnabled()) + { + log.debug(e, "Error caught in SSLReceiver"); + } _sslStatus.setSslErrorFlag(); synchronized(_sslStatus.getSslLock()) { |