From 5554e3a51f52562e08bcff1b8ee1276c9c2b6515 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Thu, 31 Jan 2013 15:16:30 +0100 Subject: [PATCH] Never send starttls when the connection is already encrypted --- src/XMPPConnection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XMPPConnection.m b/src/XMPPConnection.m index b4506f9..5a2a7ee 100644 --- a/src/XMPPConnection.m +++ b/src/XMPPConnection.m @@ -1015,7 +1015,7 @@ namespace: XMPP_NS_SASL]; OFMutableSet *mechanisms = [OFMutableSet set]; - if (starttls != nil) { + if (!encrypted && starttls != nil) { [self sendStanza: [OFXMLElement elementWithName: @"starttls" namespace: XMPP_NS_STARTTLS]];