diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py index c20d9c7e9da7..8c2c54c07a49 100644 --- a/synapse/replication/http/_base.py +++ b/synapse/replication/http/_base.py @@ -345,7 +345,7 @@ async def send_request(*, instance_name: str = "master", **kwargs: Any) -> Any: _outgoing_request_counter.labels(cls.NAME, 200).inc() # Wait on any streams that the remote may have written to. - for stream_name, position in result.get( + for stream_name, position in result.pop( _STREAM_POSITION_KEY, {} ).items(): await replication.wait_for_stream_position(