Skip to content

Commit

Permalink
modify close method according to asyncio docs, resolve TypeError (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
treychaffin authored Mar 30, 2024
1 parent 9dd02b8 commit e0a5160
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 e0a5160

Please sign in to comment.