Skip to content

Commit

Permalink
fix passing coroutine to asyncio.wait
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored and FlorianLudwig committed Apr 17, 2022
1 parent c88bd08 commit f95f97b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion amqtt/mqtt/protocol/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ async def _retry_deliveries(self):
for message in itertools.chain(
self.session.inflight_in.values(), self.session.inflight_out.values()
):
tasks.append(asyncio.wait_for(self._handle_message_flow(message), 10))
tasks.append(
asyncio.create_task(
asyncio.wait_for(self._handle_message_flow(message), 10)
)
)
if tasks:
done, pending = await asyncio.wait(tasks)
self.logger.debug("%d messages redelivered" % len(done))
Expand Down

0 comments on commit f95f97b

Please sign in to comment.