Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit f0601a2

Browse files
erikjohnstonDavid Robertson
authored andcommitted
Fix StreamIdGenerator not handling unpersisted IDs
Spotted by @erikjohnston. Closes #14456.
1 parent 8d3fd3a commit f0601a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synapse/storage/util/id_generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def manager() -> Generator[Sequence[int], None, None]:
253253
return _AsyncCtxManagerWrapper(manager())
254254

255255
def get_current_token(self) -> int:
256-
if self._is_writer:
256+
if not self._is_writer:
257257
return self._current
258258

259259
with self._lock:

0 commit comments

Comments
 (0)