Skip to content

Commit

Permalink
fix: return the pool from _async_init__ if it's already initialized (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
guacs authored Jul 17, 2024
1 parent e848814 commit 7dc5872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asyncpg/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,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')
Expand Down

0 comments on commit 7dc5872

Please sign in to comment.