element-hq / mautrix-telegram

A Matrix-Telegram hybrid puppeting/relaybot bridge
https://matrix.to/#/#telegram:maunium.net
GNU Affero General Public License v3.0
14 stars 6 forks source link

v1.10.2-mod-5: Error while checking AS connection pool stats: 'NoneType' object has no attribute 'connector' #28

Closed jaller94 closed 2 years ago

jaller94 commented 2 years ago
[2021-12-03 14:57:14,883] [ERROR@mau.init] Error while checking AS connection pool stats: 'NoneType' object has no attribute 'connector'
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/mautrix_telegram/__main__.py", line 228, in _loop_check_as_connection_pool
    connector = self.az._http_session.connector
AttributeError: 'NoneType' object has no attribute 'connector'
[2021-12-03 14:57:14,884] [INFO@mau.mx] Ensuring connectivity to homeserver

PR that look responsible

jaller94 commented 2 years ago

This line should likely just use the http_session method and catch the possible AttributeError("the http_session attribute can only be used after starting").

Another option is to set up this task in the start method. Until then there aren't going to be any updates posted to the metric anyway.

https://github.com/vector-im/mautrix-telegram/blob/5211f95f5116eb7cd633807bb00beb9b041495bd/mautrix_telegram/__main__.py#L228