decrypt: ensure_future is no more required

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-24 19:50:11 +01:00
parent 9947fdbb2e
commit 2c4dc24b84
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -720,11 +720,8 @@ class XEP_0384(BasePlugin):
should_heartbeat = await self._should_heartbeat(sender, sid, isPrekeyMessage)
if should_heartbeat:
log.debug('Decryption: Sending hearbeat to %s / %d', jid, sid)
async def send_heartbeat():
log.debug('Sending a heartbeat message')
msg = await self.make_heartbeat(JID(jid), sid)
msg.send()
asyncio.ensure_future(send_heartbeat())
msg = await self.make_heartbeat(JID(jid), sid)
msg.send()
return body