summary refs log tree commit diff
path: root/synapse/federation/sender/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-10-24 13:05:14 +0100
committerGitHub <noreply@github.com>2022-10-24 13:05:14 +0100
commit09b588854e3a6abc4ea2eaa68bb0345f23be5ce8 (patch)
treea499bc9c5b22492047630c1a45a078f838231ee5 /synapse/federation/sender/__init__.py
parentOnly build aarch64 wheels for cpython manylinux (#14259) (diff)
downloadsynapse-09b588854e3a6abc4ea2eaa68bb0345f23be5ce8.tar.xz
Fix `TypeError: 'dict_keys' object is not reversible` (#14280)
Diffstat (limited to 'synapse/federation/sender/__init__.py')
-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(