Currently, we only track Clock.call_later(...) calls but Clock.sleep(...) can equally hold references to the homeserver and need to be cleaned up during shutdown in order for the homeserver to be garbage collected.
Spawning from https://github.com/element-hq/synapse-small-hosts/pull/204#discussion_r2525000337
Follow-up to #18828
Currently, we only track
Clock.call_later(...)calls butClock.sleep(...)can equally hold references to the homeserver and need to be cleaned up duringshutdownin order for the homeserver to be garbage collected.Spawning from https://github.com/element-hq/synapse-small-hosts/pull/204#discussion_r2525000337
Follow-up to #18828