Skip to content

Commit

Permalink
small fix in timing when we require the sending sema
Browse files Browse the repository at this point in the history
  • Loading branch information
cereal2nd committed Oct 8, 2024
1 parent a960cd5 commit 9fe9546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duotecno/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ async def write(self, msg: str) -> None:
async def _writeTask(self) -> None:
while True:
try:
await self.sendSema.acquire()
msg = await self.sendQueue.get()
await self.sendSema.acquire()
msg = f"{msg}{chr(10)}"
self.writer.write(msg.encode())
await self.writer.drain()
Expand Down

0 comments on commit 9fe9546

Please sign in to comment.