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):
|
async def _keepalive(self, event=None):
|
||||||
log.debug("Keepalive ping...")
|
log.debug("Keepalive ping...")
|
||||||
try:
|
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:
|
except IqTimeout:
|
||||||
log.debug("Did not receive ping back in time. " + \
|
log.debug("Did not receive ping back in time. " + \
|
||||||
"Requesting Reconnect.")
|
"Requesting Reconnect.")
|
||||||
|
Loading…
Reference in New Issue
Block a user