summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-05 17:13:44 +0100
committerErik Johnston <erik@matrix.org>2017-04-05 17:13:44 +0100
commitfcc803b2bf9bd389a7f7d227a7c0386d22d37645 (patch)
tree5346d7ca9f09552c5735cf31591c6550b036e92f
parentMerge pull request #2104 from matrix-org/erikj/metrics_tcp (diff)
downloadsynapse-fcc803b2bf9bd389a7f7d227a7c0386d22d37645.tar.xz
Add log lines
Diffstat (limited to '')
-rw-r--r--synapse/replication/tcp/protocol.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/replication/tcp/protocol.py b/synapse/replication/tcp/protocol.py
index d4d672aafe..19b1ce504f 100644
--- a/synapse/replication/tcp/protocol.py
+++ b/synapse/replication/tcp/protocol.py
@@ -220,6 +220,7 @@ class BaseReplicationStreamProtocol(LineOnlyReceiver):
             logger.exception("[%s] Failed to handle line: %r", self.id(), line)
 
     def close(self):
+        logger.warn("[%s] Closing connection", self.id())
         self.time_we_closed = self.clock.time_msec()
         self.transport.loseConnection()
         self.on_connection_closed()
@@ -505,7 +506,7 @@ class ClientReplicationStreamProtocol(BaseReplicationStreamProtocol):
     def on_SERVER(self, cmd):
         if cmd.data != self.server_name:
             logger.error("[%s] Connected to wrong remote: %r", self.id(), cmd.data)
-            self.transport.abortConnection()
+            self.send_error("Wrong remote")
 
     def on_RDATA(self, cmd):
         try: