summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-10-25 15:39:35 +0100
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-10-25 15:39:35 +0100
commit85fcbba59599447ca66793b66670e2d42a1b0813 (patch)
tree0034e985d69d8464e94bc84eaf615643091c563b /synapse/federation
parentRefactor OIDC tests to better mimic an actual OIDC provider. (#13910) (diff)
parentTweak changelog (diff)
downloadsynapse-85fcbba59599447ca66793b66670e2d42a1b0813.tar.xz
Merge branch 'release-v1.70' into develop
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/sender/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py
index 774ecd81b6..3ad483efe0 100644
--- a/synapse/federation/sender/__init__.py
+++ b/synapse/federation/sender/__init__.py
@@ -536,8 +536,7 @@ class FederationSender(AbstractFederationSender):
 
                 if event_entries:
                     now = self.clock.time_msec()
-                    last_id = next(reversed(event_ids))
-                    ts = event_to_received_ts[last_id]
+                    ts = max(t for t in event_to_received_ts.values() if t)
                     assert ts is not None
 
                     synapse.metrics.event_processing_lag.labels(