facebook icon indicating copy to clipboard operation
facebook copied to clipboard

Handle `listen_task = None` while reconnecting

Open NicolaiSoeborg opened this issue 3 years ago • 1 comments

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)

NicolaiSoeborg avatar Mar 20 '22 14:03 NicolaiSoeborg

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

tulir avatar Mar 30 '22 09:03 tulir