Use a set to track negotiated features.

Added guards to prevent renegotiating STARTTLS or SASL in cases where
servers don't behave properly.
This commit is contained in:
Lance Stout
2011-07-02 22:30:34 -07:00
parent fba235a801
commit b898b14b77
5 changed files with 18 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ class ClientXMPP(BaseXMPP):
"xmlns='%s'" % self.default_ns)
self.stream_footer = "</stream:stream>"
self.features = []
self.features = set()
self._stream_feature_handlers = {}
self._stream_feature_order = []
@@ -273,7 +273,7 @@ class ClientXMPP(BaseXMPP):
self.sessionstarted = False
self.bound = False
self.bindfail = False
self.features = []
self.features = set()
def session_timeout():
if not self.session_started_event.isSet():