mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-05 10:44:59 -04:00
Remove all global reactor imports & pass it around explicitly (#3424)
This commit is contained in:
parent
1d009013b3
commit
07cad26d65
9 changed files with 29 additions and 22 deletions
|
@ -15,7 +15,7 @@
|
|||
"""The server side of the replication stream.
|
||||
"""
|
||||
|
||||
from twisted.internet import defer, reactor
|
||||
from twisted.internet import defer
|
||||
from twisted.internet.protocol import Factory
|
||||
|
||||
from .streams import STREAMS_MAP, FederationStream
|
||||
|
@ -109,7 +109,7 @@ class ReplicationStreamer(object):
|
|||
self.is_looping = False
|
||||
self.pending_updates = False
|
||||
|
||||
reactor.addSystemEventTrigger("before", "shutdown", self.on_shutdown)
|
||||
hs.get_reactor().addSystemEventTrigger("before", "shutdown", self.on_shutdown)
|
||||
|
||||
def on_shutdown(self):
|
||||
# close all connections on shutdown
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue