From 636946f10da7d644a055eab40db198d7156505ea Mon Sep 17 00:00:00 2001 From: Parsa <59599626+parsapoorsh@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:58:43 +0330 Subject: [PATCH] fix mysql (Got an error reading communication packets) this commit fixes #166 --- aiomysql/pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiomysql/pool.py b/aiomysql/pool.py index eaaddbe0..c7979504 100644 --- a/aiomysql/pool.py +++ b/aiomysql/pool.py @@ -121,7 +121,7 @@ async def wait_closed(self): while self._free: conn = self._free.popleft() - conn.close() + await conn.ensure_closed() async with self._cond: while self.size > self.freesize: