Moar comments
parent
7b2af21b93
commit
ffdf38c3e8
|
@ -114,7 +114,7 @@ class BaseReplicationStreamProtocol(LineOnlyReceiver):
|
|||
are only sent by the server.
|
||||
|
||||
On receiving a new command it calls `on_<COMMAND_NAME>` with the parsed
|
||||
command.
|
||||
command before delegating to `ReplicationCommandHandler.on_<COMMAND_NAME>`.
|
||||
|
||||
It also sends `PING` periodically, and correctly times out remote connections
|
||||
(if they send a `PING` command)
|
||||
|
|
|
@ -46,8 +46,14 @@ class ReplicationStreamProtocolFactory(Factory):
|
|||
self.clock = hs.get_clock()
|
||||
self.server_name = hs.config.server_name
|
||||
|
||||
# Ensure the replication streamer is started if we register a
|
||||
# replication server endpoint.
|
||||
# If we've created a `ReplicationStreamProtocolFactory` then we're
|
||||
# almost certainly registering a replication listener, so let's ensure
|
||||
# that we've started a `ReplicationStreamer` instance to actually push
|
||||
# data.
|
||||
#
|
||||
# (This is a bit of a weird place to do this, but the alternatives such
|
||||
# as putting this in `HomeServer.setup()`, requires either passing the
|
||||
# listener config again or always starting a `ReplicationStreamer`.)
|
||||
hs.get_replication_streamer()
|
||||
|
||||
def buildProtocol(self, addr):
|
||||
|
|
Loading…
Reference in New Issue