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:
commit
e4c055a65e
2 changed files with 7 additions and 0 deletions
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue