summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-05-31 10:59:14 -0700
committerLance Stout <lancestout@gmail.com>2011-05-31 10:59:14 -0700
commit5ed27bf5f65f03e14da24a60e261a175074cb7aa (patch)
treec79db47352f003b51459016df699032b51712292 /sleekxmpp/clientxmpp.py
parent62bdaab7c7fc5a35c83ac9f3b0bf5b393f0eb925 (diff)
parenta81162edd2434756e21d7f9a79d71d770a43db7b (diff)
downloadslixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.gz
slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.bz2
slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.xz
slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.zip
Merge branch 'develop' into roster
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 0d5c85b0..a7b24351 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -75,9 +75,6 @@ class ClientXMPP(BaseXMPP):
self.plugin_whitelist = plugin_whitelist
self.srv_support = SRV_SUPPORT
- self.session_started_event = threading.Event()
- self.session_started_event.clear()
-
self.stream_header = "<stream:stream to='%s' %s %s version='1.0'>" % (
self.boundjid.host,
"xmlns:stream='%s'" % self.stream_ns,
@@ -313,7 +310,7 @@ class ClientXMPP(BaseXMPP):
self._handle_tls_start,
name='TLS Proceed',
instream=True)
- self.send_xml(xml)
+ self.send_xml(xml, now=True)
return True
else:
log.warning("The module tlslite is required to log in" +\
@@ -369,11 +366,13 @@ class ClientXMPP(BaseXMPP):
self.send("<auth xmlns='%s' mechanism='PLAIN'>%s</auth>" % (
sasl_ns,
- auth))
+ auth),
+ now=True)
elif 'sasl:ANONYMOUS' in self.features and not self.boundjid.user:
self.send("<auth xmlns='%s' mechanism='%s' />" % (
sasl_ns,
- 'ANONYMOUS'))
+ 'ANONYMOUS'),
+ now=True)
else:
log.error("No appropriate login method.")
self.disconnect()
@@ -416,7 +415,7 @@ class ClientXMPP(BaseXMPP):
res.text = self.boundjid.resource
xml.append(res)
iq.append(xml)
- response = iq.send()
+ response = iq.send(now=True)
bind_ns = 'urn:ietf:params:xml:ns:xmpp-bind'
self.set_jid(response.xml.find('{%s}bind/{%s}jid' % (bind_ns,
@@ -439,7 +438,7 @@ class ClientXMPP(BaseXMPP):
"""
if self.authenticated and self.bound:
iq = self.makeIqSet(xml)
- response = iq.send()
+ response = iq.send(now=True)
log.debug("Established Session")
self.sessionstarted = True
self.session_started_event.set()