Merge branch 'fix-reconnect' into 'master'

display a delayed reconnect info, needs slixmpp!35

See merge request poezio/poezio!72
This commit is contained in:
Maxime Buquet 2020-03-29 15:26:12 +02:00
commit e4c055a65e
2 changed files with 7 additions and 0 deletions

View file

@ -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),

View file

@ -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