Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug : await self._connection.acquire() Failed #241

Open
CL545740896 opened this issue Sep 7, 2020 · 0 comments
Open

Bug : await self._connection.acquire() Failed #241

CL545740896 opened this issue Sep 7, 2020 · 0 comments

Comments

@CL545740896
Copy link

@CL545740896 CL545740896 commented Sep 7, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant