summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2020-03-29 14:26:38 +0200
committerGeorg Lukas <georg@op-co.de>2020-03-29 14:27:47 +0200
commit4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9 (patch)
tree87166a4cd2b9a8dd1e12f02ba44adfe25d88d3d5
parent2101439e8693e3be233e59280b0386f0622c756e (diff)
downloadpoezio-4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9.tar.gz
poezio-4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9.tar.bz2
poezio-4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9.tar.xz
poezio-4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9.zip
display a delayed reconnect info, needs slixmpp!35
-rw-r--r--poezio/core/core.py1
-rw-r--r--poezio/core/handlers.py6
2 files changed, 7 insertions, 0 deletions
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