diff options
author | Georg Lukas <georg@op-co.de> | 2019-03-26 12:13:01 +0100 |
---|---|---|
committer | Georg Lukas <georg@op-co.de> | 2019-03-26 12:18:30 +0100 |
commit | 40f292d998650abc1b25b6bbf94b9c4b6174a3a8 (patch) | |
tree | dd9c5711fb84f8336de388577f592436d22f7e47 | |
parent | 910240afb6d2c180d0d6a4207a08d6b5a4c2f64b (diff) | |
download | poezio-40f292d998650abc1b25b6bbf94b9c4b6174a3a8.tar.gz poezio-40f292d998650abc1b25b6bbf94b9c4b6174a3a8.tar.bz2 poezio-40f292d998650abc1b25b6bbf94b9c4b6174a3a8.tar.xz poezio-40f292d998650abc1b25b6bbf94b9c4b6174a3a8.zip |
Use new slixmpp!12 disconnect/reconnect semantics
-rw-r--r-- | poezio/core/core.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py index 6bb19d16..ed977b6d 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -834,14 +834,10 @@ class Core: self.legitimate_disconnect = True for tab in self.get_tabs(tabs.MucTab): tab.command_part(msg) - self.xmpp.disconnect() if reconnect: - # Add a one-time event to reconnect as soon as we are - # effectively disconnected - self.xmpp.add_event_handler( - 'disconnected', - lambda event: self.xmpp.connect(), - disposable=True) + self.xmpp.reconnect(wait=0.0, reason=msg) + else: + self.xmpp.disconnect(reason=msg) def send_message(self, msg: str) -> bool: """ |