Skip to content

Commit

Permalink
fix async lock call
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrMuellerluedenscheid committed Jan 9, 2021
1 parent 0c43f24 commit 87cc9fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hbmqtt/mqtt/protocol/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ async def _reader_loop(self):

async def _send_packet(self, packet):
try:
with (await self._write_lock):
async with self._write_lock:
await packet.to_stream(self.writer)
if self._keepalive_task:
self._keepalive_task.cancel()
Expand Down

0 comments on commit 87cc9fc

Please sign in to comment.