diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2009-03-03 20:43:34 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2009-03-03 20:43:34 +0000 |
| commit | 62eb9dcb9d62e188946ed634286a838d91eebcb0 (patch) | |
| tree | 367eca97297955995c5778d068b51d7987fe4818 /java/common/src/main | |
| parent | dc982976590c95beee9e2e0d602f974f5a8933a3 (diff) | |
| download | qpid-python-62eb9dcb9d62e188946ed634286a838d91eebcb0.tar.gz | |
QPID-1708: go into CLOSED instead of DETACHED state when there is an execution exception
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749740 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src/main')
| -rw-r--r-- | java/common/src/main/java/org/apache/qpid/transport/Session.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/transport/Session.java b/java/common/src/main/java/org/apache/qpid/transport/Session.java index 9920b67d79..361db42498 100644 --- a/java/common/src/main/java/org/apache/qpid/transport/Session.java +++ b/java/common/src/main/java/org/apache/qpid/transport/Session.java @@ -537,7 +537,15 @@ public class Session extends SessionInvoker } break; case CLOSED: - throw new SessionClosedException(); + ExecutionException exc = getException(); + if (exc != null) + { + throw new SessionException(exc); + } + else + { + throw new SessionClosedException(); + } default: throw new SessionException (String.format @@ -868,7 +876,7 @@ public class Session extends SessionInvoker { synchronized (commands) { - if (expiry == 0) + if (expiry == 0 || getException() != null) { state = CLOSED; } |
