diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-11-04 02:06:45 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-11-04 02:06:45 +0000 |
| commit | b8ea27b54e0dc0e5ebf8d7a17e6cc68e5307a422 (patch) | |
| tree | fe8b7f964e36a75ff3d7a0640e1b853f71ba4e1e /qpid/java/common/src/main | |
| parent | c510180f3e38542f0795f52513b930d155c78987 (diff) | |
| download | qpid-python-b8ea27b54e0dc0e5ebf8d7a17e6cc68e5307a422.tar.gz | |
QPID-4419: ensure the broker kills the 0-10 connection immediately for explicit reason that no sasl mech was chosen, instead of sending an incorrect ConnectionTune and then killing the connection as side effect of a subsequent NPE.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1405489 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/main')
| -rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java index e9a7d51456..1e0d5b9698 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java @@ -71,7 +71,8 @@ public class ServerDelegate extends ConnectionDelegate if (mechanism == null || mechanism.length() == 0) { - tuneAuthorizedConnection(conn); + conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED, + "No Sasl mechanism was specified"); return; } @@ -82,7 +83,7 @@ public class ServerDelegate extends ConnectionDelegate if (ss == null) { conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED, - "null SASL mechanism: " + mechanism); + "No SaslServer could be created for mechanism: " + mechanism); return; } conn.setSaslServer(ss); |
