Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Handle listen_task = None while reconnecting #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NicolaiSoeborg
Copy link
Contributor

Got this error, not sure why, but I think it should be safe to skip the await and continue the reconnect method if self.listen_task is None.

[[email protected]_reconnect] Error while reconnecting @nick:homeserver
Traceback (most recent call last):
  File "/path/mautrix-facebook/mautrix_facebook/__main__.py", line 159, in _periodic_reconnect_loop
    await user.reconnect()
  File "/path/mautrix-facebook/mautrix_facebook/user.py", line 445, in reconnect
    await self.listen_task
 TypeError: object NoneType can't be used in 'await' expression

(I'm running on newest master, i.e. 7562745)

```
[[email protected]_reconnect] Error while reconnecting @nick:homeserver
Traceback (most recent call last):
  File "/path/mautrix-facebook/mautrix_facebook/__main__.py", line 159, in _periodic_reconnect_loop
    await user.reconnect()
  File "/path/mautrix-facebook/mautrix_facebook/user.py", line 445, in reconnect
    await self.listen_task
 TypeError: object NoneType can't be used in 'await' expression
```
@sumnerevans sumnerevans requested a review from tulir March 20, 2022 15:33
@tulir
Copy link
Member

tulir commented Mar 30, 2022

Not entirely sure if this is safe, I need to make sure there's something else blocking reconnection attempts if the user got logged out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants