From 49beb3ac08e1e5c954c0d21ed1a63060cbab236b Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 21 Sep 2014 18:42:51 +0200 Subject: =?UTF-8?q?Don=E2=80=99t=20set=20the=20wait=20time=20to=20True=20i?= =?UTF-8?q?nstead=20of=20leaving=20its=20float=20default,=20in=20examples.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/custom_stanzas/custom_stanza_user.py | 4 +--- examples/download_avatars.py | 2 +- examples/send_client.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/custom_stanzas/custom_stanza_user.py b/examples/custom_stanzas/custom_stanza_user.py index 66bad523..c5630584 100755 --- a/examples/custom_stanzas/custom_stanza_user.py +++ b/examples/custom_stanzas/custom_stanza_user.py @@ -83,9 +83,7 @@ class ActionUserBot(slixmpp.ClientXMPP): iq2['action']['method'] = 'bye' iq2.send(block=False) - # The wait=True delays the disconnect until the queue - # of stanzas to be sent becomes empty. - self.disconnect(wait=True) + self.disconnect() except XMPPError: print('There was an error sending the custom action.') diff --git a/examples/download_avatars.py b/examples/download_avatars.py index df722856..c6d8c59c 100755 --- a/examples/download_avatars.py +++ b/examples/download_avatars.py @@ -60,7 +60,7 @@ class AvatarDownloader(slixmpp.ClientXMPP): print('Waiting for presence updates...\n') self.presences_received.wait(15) - self.disconnect(wait=True) + self.disconnect() def on_vcard_avatar(self, pres): print("Received vCard avatar update from %s" % pres['from'].bare) diff --git a/examples/send_client.py b/examples/send_client.py index a3b11707..6e3e5865 100755 --- a/examples/send_client.py +++ b/examples/send_client.py @@ -58,9 +58,7 @@ class SendMsgBot(slixmpp.ClientXMPP): mbody=self.msg, mtype='chat') - # Using wait=True ensures that the send queue will be - # emptied before ending the session. - self.disconnect(wait=True) + self.disconnect() if __name__ == '__main__': -- cgit v1.2.3