Merge branch 'master' into 'master'

Communicate the reason for a disconnect to the application

See merge request poezio/slixmpp!12
This commit is contained in:
Maxime Buquet
2019-04-07 00:24:50 +02:00
2 changed files with 18 additions and 10 deletions

View File

@@ -112,9 +112,9 @@ class XEP_0199(BasePlugin):
try:
rtt = await self.ping(self.xmpp.boundjid.host, timeout=self.timeout)
except IqTimeout:
log.debug("Did not receive ping back in time." + \
log.debug("Did not receive ping back in time. " + \
"Requesting Reconnect.")
self.xmpp.reconnect()
self.xmpp.reconnect(0.0, "Ping timeout after %ds" % self.timeout)
else:
log.debug('Keepalive RTT: %s' % rtt)