Never send starttls when the connection is already encrypted

This commit is contained in:
Florian Zeitz 2013-01-31 15:16:30 +01:00
parent b7d92694ba
commit 5554e3a51f

View file

@ -1015,7 +1015,7 @@
namespace: XMPP_NS_SASL]; namespace: XMPP_NS_SASL];
OFMutableSet *mechanisms = [OFMutableSet set]; OFMutableSet *mechanisms = [OFMutableSet set];
if (starttls != nil) { if (!encrypted && starttls != nil) {
[self sendStanza: [self sendStanza:
[OFXMLElement elementWithName: @"starttls" [OFXMLElement elementWithName: @"starttls"
namespace: XMPP_NS_STARTTLS]]; namespace: XMPP_NS_STARTTLS]];