XEP-0199: handle component case for keepalive ping
This commit is contained in:
parent
dcaf812a28
commit
7c79f28587
@ -137,7 +137,14 @@ class XEP_0199(BasePlugin):
|
||||
async def _keepalive(self, event=None):
|
||||
log.debug("Keepalive ping...")
|
||||
try:
|
||||
rtt = await self.ping(self.xmpp.boundjid.host, timeout=self.timeout)
|
||||
ifrom = None
|
||||
if self.xmpp.is_component:
|
||||
ifrom = self.xmpp.boundjid
|
||||
rtt = await self.ping(
|
||||
self.xmpp.boundjid.host,
|
||||
timeout=self.timeout,
|
||||
ifrom=ifrom
|
||||
)
|
||||
except IqTimeout:
|
||||
log.debug("Did not receive ping back in time. " + \
|
||||
"Requesting Reconnect.")
|
||||
|
Loading…
Reference in New Issue
Block a user