summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-05-04 14:11:21 -0400
committerGitHub <noreply@github.com>2022-05-04 14:11:21 -0400
commit7fbf42499d92ec3c9a05d9f36ec5fecd1ab1f18c (patch)
tree5f3a08745f204376a211aa3ece6f92f4108a9891 /synapse/http
parentImplement changes to MSC2285 (hidden read receipts) (#12168) (diff)
downloadsynapse-7fbf42499d92ec3c9a05d9f36ec5fecd1ab1f18c.tar.xz
Use `getClientAddress` instead of `getClientIP`. (#12599)
getClientIP was deprecated in Twisted 18.4.0, which also added
getClientAddress. The Synapse minimum version for Twisted is
currently 18.9.0, so all supported versions have the new API.
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/site.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py
index 40f6c04894..0b85a57d77 100644
--- a/synapse/http/site.py
+++ b/synapse/http/site.py
@@ -238,7 +238,7 @@ class SynapseRequest(Request):
             request_id,
             request=ContextRequest(
                 request_id=request_id,
-                ip_address=self.getClientIP(),
+                ip_address=self.getClientAddress().host,
                 site_tag=self.synapse_site.site_tag,
                 # The requester is going to be unknown at this point.
                 requester=None,
@@ -381,7 +381,7 @@ class SynapseRequest(Request):
 
         self.synapse_site.access_logger.debug(
             "%s - %s - Received request: %s %s",
-            self.getClientIP(),
+            self.getClientAddress().host,
             self.synapse_site.site_tag,
             self.get_method(),
             self.get_redacted_uri(),
@@ -429,7 +429,7 @@ class SynapseRequest(Request):
             "%s - %s - {%s}"
             " Processed request: %.3fsec/%.3fsec (%.3fsec, %.3fsec) (%.3fsec/%.3fsec/%d)"
             ' %sB %s "%s %s %s" "%s" [%d dbevts]',
-            self.getClientIP(),
+            self.getClientAddress().host,
             self.synapse_site.site_tag,
             requester,
             processing_time,