From 2c4dc24b843366ceca1ae3cec30e60917ae92055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 24 Mar 2022 19:50:11 +0100 Subject: [PATCH] decrypt: ensure_future is no more required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp_omemo/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index b16d1ff..068cccc 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -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