Moar comments

pull/7187/head
Erik Johnston 2020-04-06 18:36:32 +01:00
parent 7b2af21b93
commit ffdf38c3e8
2 changed files with 9 additions and 3 deletions

View File

@ -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)

View File

@ -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):