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
1 changed files with 1 additions and 0 deletions

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