From e4a0029b86813549ac7fc94d5485151b6e6a18df Mon Sep 17 00:00:00 2001 From: guacs Date: Thu, 16 Nov 2023 10:52:09 +0530 Subject: [PATCH] fix: return the pool from _async_init__ if it's already initialized --- asyncpg/pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asyncpg/pool.py b/asyncpg/pool.py index 06e698df..4d6ed7c1 100644 --- a/asyncpg/pool.py +++ b/asyncpg/pool.py @@ -392,7 +392,7 @@ def __init__(self, *connect_args, async def _async__init__(self): if self._initialized: - return + return self if self._initializing: raise exceptions.InterfaceError( 'pool is being initialized in another task')