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
This commit is contained in:
Florian Zeitz 2014-02-03 23:55:42 +01:00
parent 076abde1b8
commit 3dd1196bbe

View file

@ -1102,7 +1102,8 @@
assert(0); assert(0);
} }
if (session != nil) if (session != nil && ![session elementForName: @"optional"
namespace: XMPP_NS_SESSION])
_needsSession = true; _needsSession = true;
if (bind != nil) { if (bind != nil) {