diff --git a/synapse/types/__init__.py b/synapse/types/__init__.py index d127be98ed..8b005ef84d 100644 --- a/synapse/types/__init__.py +++ b/synapse/types/__init__.py @@ -686,7 +686,7 @@ class AbstractMultiWriterStreamToken(metaclass=abc.ABCMeta): def bound_stream_token(self, max_stream: int) -> "Self": """Bound the stream positions to a maximum value""" # Shortcut if we're already under the bound - if max_stream <= self.get_max_stream_pos(): + if self.get_max_stream_pos() <= max_stream: return self min_pos = min(self.stream, max_stream)