diff options
author | Lance Stout <lancestout@gmail.com> | 2012-01-18 11:51:00 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-01-18 11:51:00 -0800 |
commit | 1e01903072927917cf5c64ceb7bb1aac3770ea5c (patch) | |
tree | d0ae471cc15183ea4e40721fc8a31441faddb021 /sleekxmpp/clientxmpp.py | |
parent | 3672856ab47900a8bf505cea3ea401eec8253318 (diff) | |
download | slixmpp-1e01903072927917cf5c64ceb7bb1aac3770ea5c.tar.gz slixmpp-1e01903072927917cf5c64ceb7bb1aac3770ea5c.tar.bz2 slixmpp-1e01903072927917cf5c64ceb7bb1aac3770ea5c.tar.xz slixmpp-1e01903072927917cf5c64ceb7bb1aac3770ea5c.zip |
Revert "Remove stream feature handlers on session_start."
This reverts commit 4274f49ada77d709b931f65e34d3a64e75b81638.
The SASL mech was choking on this, so let's send it back for some
more refining.
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r-- | sleekxmpp/clientxmpp.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py index 3313328a..69e7db6c 100644 --- a/sleekxmpp/clientxmpp.py +++ b/sleekxmpp/clientxmpp.py @@ -98,12 +98,14 @@ class ClientXMPP(BaseXMPP): self.add_event_handler('connected', self._handle_connected) self.add_event_handler('session_bind', self._handle_session_bind) - self.add_event_handler('stream_start', self._handle_stream_start) - self.add_event_handler('session_start', self._handle_session_start) self.register_stanza(StreamFeatures) self.register_handler( + Callback('Stream Features', + MatchXPath('{%s}features' % self.stream_ns), + self._handle_stream_features)) + self.register_handler( Callback('Roster Update', MatchXPath('{%s}iq/{%s}query' % ( self.default_ns, @@ -117,15 +119,6 @@ class ClientXMPP(BaseXMPP): self.register_plugin('feature_mechanisms', pconfig={'use_mech': sasl_mech} if sasl_mech else None) - def _handle_stream_start(self, root): - self.register_handler( - Callback('Stream Features', - MatchXPath('{%s}features' % self.stream_ns), - self._handle_stream_features)) - - def _handle_session_start(self, e): - self.remove_handler('Stream Features') - def connect(self, address=tuple(), reattempt=True, use_tls=True, use_ssl=False): """Connect to the XMPP server. |