From b8ea27b54e0dc0e5ebf8d7a17e6cc68e5307a422 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Sun, 4 Nov 2012 02:06:45 +0000 Subject: 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 --- .../src/main/java/org/apache/qpid/transport/ServerDelegate.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qpid/java/common/src/main') 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); -- cgit v1.2.1