databases
databases copied to clipboard
Bug : await self._connection.acquire() Failed
When the connection is abnormal, due to local network problems, etc., it will not work when the network is restored.
#Fix self._connection.acquire() Failed FilePath : core.py - > Line : 213
async def __aenter__(self) -> "Connection":
async with self._connection_lock:
self._connection_counter += 1
if self._connection_counter == 1:
try:
# add a catch to acquire connection
await self._connection.acquire()
except Exception as e:
# reset the _connection_counter = 1
self._connection_counter = 1
return self