Skip to content

Commit

Permalink
modified close method according to recommendation in asyncio docs, re…
Browse files Browse the repository at this point in the history
…solved TypeError
  • Loading branch information
treychaffin committed Mar 26, 2024
1 parent 9dd02b8 commit 9208da7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alicat/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ async def _handle_communication(self, command: str) -> Optional[str]:
async def close(self) -> None:
"""Close the TCP connection."""
if self.open:
await self.connection['writer'].close()
self.connection['writer'].close()
await self.connection['writer'].wait_closed()
self.open = False


Expand Down

0 comments on commit 9208da7

Please sign in to comment.