From 5a47f56cd0188ec84e9770f8570a1c1265a8d893 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 14 Nov 2016 18:43:40 +0100 Subject: [PATCH] Call shutdown() before throwing Follow up on a9d5cd4a611f47123f9561bc5a81a4555fe7cb04 / 059ee99ba0d5ff7758829acf5a9aeede09ec820b (SMACK-739). --- .../main/java/org/jivesoftware/smack/AbstractXMPPConnection.java | 1 + 1 file changed, 1 insertion(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java index 9868d49cb..3f93a7073 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java @@ -378,6 +378,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { // from the server and throw an error. First check if we've already negotiated TLS // and are secure, however (features get parsed a second time after TLS is established). if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) { + shutdown(); throw new SecurityRequiredByClientException(); }