diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-09-17 02:51:22 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-09-17 02:51:22 +0000 |
| commit | 1cc293de6dbed762df7dd21ee55efe732b1eb303 (patch) | |
| tree | 88d6996fa729e90958e86ba8622cfb907dc83dbc /java/common/src | |
| parent | 7b9611d44295b43233518164b7eb7a2f24ec75fb (diff) | |
| download | qpid-python-1cc293de6dbed762df7dd21ee55efe732b1eb303.tar.gz | |
QPID-2861
Added a simple null check to eliminate acting on a result that is no longer valid.
I am also adding a log message at "WARN" level if we receive a result for a command that is no longer in our map.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@997965 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src')
| -rw-r--r-- | java/common/src/main/java/org/apache/qpid/transport/Session.java | 12 |
1 files changed, 11 insertions, 1 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 52e0026f29..c891c95151 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 @@ -767,7 +767,17 @@ public class Session extends SessionInvoker { future = results.remove(command); } - future.set(result); + + if (future != null) + { + future.set(result); + } + else + { + log.warn("Broker sent a result in response to a command" + + " that's no longer valid on the client side." + + " [ command id : %s , result : %s ]",command, result); + } } void setException(ExecutionException exc) |
