Skip to content

Commit d201b45

Browse files
committed
Add note about using 'now_token'
1 parent 3a26806 commit d201b45

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

synapse/handlers/sliding_sync/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ async def current_sync_callback(
196196
sync_config.user.to_string(),
197197
timeout_ms,
198198
current_sync_callback,
199+
# We *wait* from `now_token` as we have already computed the sync
200+
# response up to `now_token` above, so we want to wait for something
201+
# new to arrive after `now_token`.
202+
#
203+
# We still generate the sync response using `from_token` in the
204+
# callback above though.
199205
from_token=now_token,
200206
)
201207
did_wait = True

0 commit comments

Comments
 (0)