From 4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9 Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Sun, 29 Mar 2020 14:26:38 +0200 Subject: display a delayed reconnect info, needs slixmpp!35 --- poezio/core/core.py | 1 + poezio/core/handlers.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/poezio/core/core.py b/poezio/core/core.py index fe6a9d78..6065f215 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -227,6 +227,7 @@ class Core: ('connected', self.handler.on_connected), ('connection_failed', self.handler.on_failed_connection), ('disconnected', self.handler.on_disconnected), + ('reconnect_delay', self.handler.on_reconnect_delay), ('failed_all_auth', self.handler.on_failed_all_auth), ('got_offline', self.handler.on_got_offline), ('got_online', self.handler.on_got_online), diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index cfdeb271..c8d08441 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -1250,6 +1250,12 @@ class HandlerCore: self.core.information("Auto-reconnecting.", 'Info') self.core.xmpp.start() + async def on_reconnect_delay(self, event): + """ + When the reconnection is delayed + """ + self.core.information("Reconnecting in %d seconds..." % (event), 'Info') + def on_stream_error(self, event): """ When we receive a stream error -- cgit v1.2.3