summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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