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