XEP-0199: use new 0-timeout reconnect() with reason

This commit is contained in:
Georg Lukas 2019-03-26 11:09:24 +01:00
parent 4f96e5fa75
commit 6b1b58a339

View File

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