From 5aeb281a955f5592a1ddcbef7590154bd284d48c Mon Sep 17 00:00:00 2001 From: Gorshkov Nikolay Date: Fri, 11 Oct 2024 16:55:53 +0500 Subject: [PATCH] fix nconns --- peewee_async/pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peewee_async/pool.py b/peewee_async/pool.py index e3988d4..8031418 100644 --- a/peewee_async/pool.py +++ b/peewee_async/pool.py @@ -116,7 +116,7 @@ async def create(self) -> None: def has_acquired_connections(self) -> bool: if self.pool is not None: - return bool(self.pool.nconns - self.pool._num_pool > 0) + return bool(self.pool._nconns - self.pool._num_pool > 0) return False async def acquire(self) -> ConnectionProtocol: