summaryrefslogtreecommitdiff
path: root/slixmpp/features/feature_session/session.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-07-20 20:46:03 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-07-20 20:46:03 +0200
commitc2f6f077762282d311a6f876f94cc1a4eb9e805f (patch)
tree935725c968da27ea1713617fa6fffcf2edbdc299 /slixmpp/features/feature_session/session.py
parent5ab77c745270d7d5c016c1dc7ef2a82533a4b16e (diff)
downloadslixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.gz
slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.bz2
slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.xz
slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.zip
Make xmlstream use an asyncio loop
Scheduled events, connection, TLS handshake (with STARTTLS), read and write on the socket are all done using only asyncio. A lot of threads, and thread-related (and thus useless) things still remain. This is only a first step.
Diffstat (limited to 'slixmpp/features/feature_session/session.py')
-rw-r--r--slixmpp/features/feature_session/session.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slixmpp/features/feature_session/session.py b/slixmpp/features/feature_session/session.py
index c2694a9f..08f7480f 100644
--- a/slixmpp/features/feature_session/session.py
+++ b/slixmpp/features/feature_session/session.py
@@ -44,8 +44,9 @@ class FeatureSession(BasePlugin):
iq = self.xmpp.Iq()
iq['type'] = 'set'
iq.enable('session')
- iq.send(now=True)
+ iq.send(block=False, callback=self._on_start_session_response)
+ def _on_start_session_response(self, response):
self.xmpp.features.add('session')
log.debug("Established Session")