diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/XMPPServer.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/juick-server/src/main/java/com/juick/server/XMPPServer.java b/juick-server/src/main/java/com/juick/server/XMPPServer.java index 643bc37b2..9dc7bf0a3 100644 --- a/juick-server/src/main/java/com/juick/server/XMPPServer.java +++ b/juick-server/src/main/java/com/juick/server/XMPPServer.java @@ -310,7 +310,7 @@ public class XMPPServer implements ConnectionListener, AutoCloseable { connection.sendStanza("<proceed xmlns=\"" + Connection.NS_TLS + "\" />"); try { connection.setSocket(sc.getSocketFactory().createSocket(connection.getSocket(), connection.getSocket().getInetAddress().getHostAddress(), - connection.getSocket().getPort(), true)); + connection.getSocket().getPort(), false)); SSLSocket sslSocket = (SSLSocket) connection.getSocket(); sslSocket.addHandshakeCompletedListener(handshakeCompletedEvent -> { try { @@ -330,7 +330,7 @@ public class XMPPServer implements ConnectionListener, AutoCloseable { connection.restartParser(); } catch (XmlPullParserException | IOException sex) { logger.warn("stream {} ssl error {}", connection.streamID, sex); - connection.sendStanza("<failed xmlns\"" + Connection.NS_TLS + "\" />"); + connection.sendStanza("<failure xmlns=\"" + Connection.NS_TLS + "\" />"); removeConnectionIn(connection); connection.closeConnection(); } @@ -341,7 +341,7 @@ public class XMPPServer implements ConnectionListener, AutoCloseable { try { Socket socket = outConnections.get(connection).get(); socket = sc.getSocketFactory().createSocket(socket, socket.getInetAddress().getHostAddress(), - socket.getPort(), true); + socket.getPort(), false); SSLSocket sslSocket = (SSLSocket) socket; sslSocket.addHandshakeCompletedListener(handshakeCompletedEvent -> { try { @@ -363,7 +363,7 @@ public class XMPPServer implements ConnectionListener, AutoCloseable { connection.sendOpenStream(); } catch (NoSuchElementException | XmlPullParserException | IOException sex) { logger.error("s2s ssl error: {} {}, error {}", connection.to, connection.getStreamID(), sex); - connection.send("<failed xmlns\"" + Connection.NS_TLS + "\" />"); + connection.send("<failure xmlns=\"" + Connection.NS_TLS + "\" />"); removeConnectionOut(connection); connection.logoff(); } |