Commit 40f292d9 authored by ge0rg's avatar ge0rg

Use new slixmpp!12 disconnect/reconnect semantics

parent 910240af
......@@ -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:
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment