summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/echo_client.py2
-rwxr-xr-xexamples/ping.py2
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/echo_client.py b/examples/echo_client.py
index 18125a0d..f2d38847 100755
--- a/examples/echo_client.py
+++ b/examples/echo_client.py
@@ -151,7 +151,7 @@ if __name__ == '__main__':
#
# if xmpp.connect(('talk.google.com', 5222)):
# ...
- xmpp.process(block=False)
+ xmpp.process(block=True)
print("Done")
else:
print("Unable to connect.")
diff --git a/examples/ping.py b/examples/ping.py
index 8fbb5655..1a1c2e94 100755
--- a/examples/ping.py
+++ b/examples/ping.py
@@ -37,7 +37,7 @@ class PingTest(sleekxmpp.ClientXMPP):
def __init__(self, jid, password, pingjid):
sleekxmpp.ClientXMPP.__init__(self, jid, password)
if pingjid is None:
- pingjid = self.jid
+ pingjid = self.boundjid.bare
self.pingjid = pingjid
# The session_start event will be triggered when
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 4d17d08c..3bc1f652 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -1343,12 +1343,12 @@ class XMLStream(object):
return True
def _start_thread(self, name, target, track=True):
- self.__active_threads.add(name)
self.__thread[name] = threading.Thread(name=name, target=target)
self.__thread[name].daemon = self._use_daemons
self.__thread[name].start()
if track:
+ self.__active_threads.add(name)
with self.__thread_cond:
self.__thread_count += 1