diff options
author | Erik Johnston <erik@matrix.org> | 2016-07-29 11:24:56 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-07-29 11:24:56 +0100 |
commit | 5aa024e50132924d50229c633249a17eff9180f1 (patch) | |
tree | 5b0ee152c49f6a772bcb4e133fd4649aa612bda3 /synapse/crypto/keyclient.py | |
parent | Add destination retry to slave store (diff) | |
parent | Merge pull request #966 from matrix-org/markjh/fix_push (diff) | |
download | synapse-5aa024e50132924d50229c633249a17eff9180f1.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fed_reader
Diffstat (limited to 'synapse/crypto/keyclient.py')
-rw-r--r-- | synapse/crypto/keyclient.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/crypto/keyclient.py b/synapse/crypto/keyclient.py index 54b83da9d8..c2bd64d6c2 100644 --- a/synapse/crypto/keyclient.py +++ b/synapse/crypto/keyclient.py @@ -77,10 +77,12 @@ class SynapseKeyClientProtocol(HTTPClient): def __init__(self): self.remote_key = defer.Deferred() self.host = None + self._peer = None def connectionMade(self): - self.host = self.transport.getHost() - logger.debug("Connected to %s", self.host) + self._peer = self.transport.getPeer() + logger.debug("Connected to %s", self._peer) + self.sendCommand(b"GET", self.path) if self.host: self.sendHeader(b"Host", self.host) @@ -124,7 +126,10 @@ class SynapseKeyClientProtocol(HTTPClient): self.timer.cancel() def on_timeout(self): - logger.debug("Timeout waiting for response from %s", self.host) + logger.debug( + "Timeout waiting for response from %s: %s", + self.host, self._peer, + ) self.errback(IOError("Timeout waiting for response")) self.transport.abortConnection() @@ -133,4 +138,5 @@ class SynapseKeyClientFactory(Factory): def protocol(self): protocol = SynapseKeyClientProtocol() protocol.path = self.path + protocol.host = self.host return protocol |