1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

Call shutdown() before throwing

Follow up on a9d5cd4a61 /
059ee99ba0 (SMACK-739).
This commit is contained in:
Florian Schmaus 2016-11-14 18:43:40 +01:00
parent 54790cd380
commit 5a47f56cd0

View file

@ -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 // 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). // and are secure, however (features get parsed a second time after TLS is established).
if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) { if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) {
shutdown();
throw new SecurityRequiredByClientException(); throw new SecurityRequiredByClientException();
} }