File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1068,13 +1068,9 @@ def make_connection(self):
1068
1068
async def release (self , connection : AbstractConnection ):
1069
1069
"""Releases the connection back to the pool"""
1070
1070
async with self ._lock :
1071
- try :
1072
- self ._in_use_connections .remove (connection )
1073
- except KeyError :
1074
- # Gracefully fail when a connection is returned to this pool
1075
- # that the pool doesn't actually own
1076
- pass
1077
-
1071
+ # Connections should always be returned to the correct pool,
1072
+ # not doing so is an error that will cause an exception here.
1073
+ self ._in_use_connections .remove (connection )
1078
1074
self ._available_connections .append (connection )
1079
1075
1080
1076
async def disconnect (self , inuse_connections : bool = True ):
You can’t perform that action at this time.
0 commit comments