Skip to content

Commit

Permalink
Cancel as_connection_metric_task on stop
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Paul authored Dec 2, 2021
1 parent e9715a1 commit ac1a728
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mautrix_telegram/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ async def resend_bridge_info(self) -> None:
def prepare_stop(self) -> None:
if self.periodic_sync_task:
self.periodic_sync_task.cancel()
if self.as_connection_metric_task:
self.as_connection_metric_task.cancel()
for puppet in Puppet.by_custom_mxid.values():
puppet.stop()
self.shutdown_actions = (user.stop() for user in User.by_tgid.values())
Expand Down

0 comments on commit ac1a728

Please sign in to comment.