From 3dd1196bbef82976dd50ee844009a0a9bfe2377c Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Mon, 3 Feb 2014 23:55:42 +0100 Subject: [PATCH] XMPPConnection: Don't negotiate a session feature, when marked optional The session feature has been deprecated as of RFC 6120. Some servers still offer it for client compatibility, but mark it as optional. Not negotiating it in this case saves us a round trip --- src/XMPPConnection.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/XMPPConnection.m b/src/XMPPConnection.m index 0135872..92d08c8 100644 --- a/src/XMPPConnection.m +++ b/src/XMPPConnection.m @@ -1102,7 +1102,8 @@ assert(0); } - if (session != nil) + if (session != nil && ![session elementForName: @"optional" + namespace: XMPP_NS_SESSION]) _needsSession = true; if (bind != nil) {