summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2020-03-29 15:26:12 +0200
committerMaxime Buquet <pep@bouah.net>2020-03-29 15:26:12 +0200
commite4c055a65ea576ca0124fb3bf21868c27eb82b8d (patch)
tree87166a4cd2b9a8dd1e12f02ba44adfe25d88d3d5
parent2101439e8693e3be233e59280b0386f0622c756e (diff)
parent4f5ccb30f82bc3b6fcd2fbeb9258926d59f615a9 (diff)
downloadpoezio-e4c055a65ea576ca0124fb3bf21868c27eb82b8d.tar.gz
poezio-e4c055a65ea576ca0124fb3bf21868c27eb82b8d.tar.bz2
poezio-e4c055a65ea576ca0124fb3bf21868c27eb82b8d.tar.xz
poezio-e4c055a65ea576ca0124fb3bf21868c27eb82b8d.zip
Merge branch 'fix-reconnect' into 'master'
display a delayed reconnect info, needs slixmpp!35 See merge request poezio/poezio!72
-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