facebook
facebook copied to clipboard
Handle `listen_task = None` while reconnecting
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. 75627451611ca79176347df387efa12db04f94ce)
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