Repository navigation
Drop time sync bursts with a timed-out reply - #376
Open
maximmaxim345 wants to merge 2 commits into
Open
maximmaxim345 wants to merge 2 commits into
maximmaxim345 wants to merge 2 commits into
Conversation
kahrendt
reviewed
Dec 3, 2026
| ## Clock Synchronization | ||
|
|
||
| Clients send `client/time` messages to maintain an accurate mapping between their clock and the server's clock. Clients MUST send them in bursts, sending each message after the reply to the previous one arrives, and MUST feed the filter only the burst's measurement with the lowest [`max_error`](#time-filter) above 0. When a reply does not arrive within a timeout the client chooses, the client MAY send the next message without it. Each burst MUST contain at least 8 messages, and consecutive bursts MUST start no more than 10 seconds apart. Servers MUST NOT close the connection solely because a client's bursts break these rules. A server MAY drop a `client/time` request while its reply to an earlier `client/time` is still waiting to be sent. | ||
| Clients send `client/time` messages to maintain an accurate mapping between their clock and the server's clock. Clients MUST send them in bursts, sending each message after the reply to the previous one arrives, and MUST feed the filter only the burst's measurement with the lowest [`max_error`](#time-filter) above 0. When a reply does not arrive within a timeout the client chooses, the burst ends there and the client MUST NOT feed the filter from that burst. Each burst MUST contain at least 8 messages unless one of its replies times out, and consecutive bursts MUST start no more than 10 seconds apart. Servers MUST NOT close the connection solely because a client's bursts break these rules. A server MAY drop a `client/time` request while its reply to an earlier `client/time` is still waiting to be sent. |
Contributor
There was a problem hiding this comment.
This is a bit confusing to me: "unless one of its replies times out"
Your first change in the text is basically saying the burst is invalid and results shouldn't be used, so I don't think the quoted text is necessary.
Perhaps you can clarify the whole thing with describing a burst as valid (which has a minimum of 8 messages) or invalid, and only valid bursts feed the filter.
Member
Author
There was a problem hiding this comment.
Good point, I reworded it: a burst is valid when it has at least 8 messages and none of its replies timed out, and only valid bursts feed the filter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
server/timereply can get lost, for example when a server discards requests during a re-handshake. The client could then send the next message without the reply, and the burst still fed the filter. A burst with a timed-out reply now ends there and feeds the filter nothing.Bursts still start no more than 10 seconds apart, so the reply timeout is the client's choice as long as the next burst starts on time.
Closes #356
Breaking changes
Clients that keep sending a burst after a timed-out reply, or feed the filter from such a burst, need an update, sendspin-cpp among them. Servers need no change.