You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e920f31
Browse filesBrowse the repository at this point in the historyBrowse files
sdk/js: cancel an abandoned join's work instead of waiting past it
From review on #739.
The examples go back to what they were: they are embedded in the user
guides, and printing the control plane URL could leak credentials or
query parameters in it. A join that stops already says where in the
error Node prints, so the probe's output shows it without them. The
error no longer names the control plane URL either.
untilAborted only stopped waiting: a control plane sync the join gave
up on went on in the background, could still call /info and refresh(),
and write credential.json. The signal now goes into the requests
themselves. ControlPlaneClient.info() and keys() and
authenticateWithPeer take one and combine it with their own timeout,
as discovery does, and syncControlPlane stops before its next request
and before saving once it aborts. A /refresh already sent is left to
finish, since the control plane spends the old biscuit when it answers.
The sync before a join is best effort, so it gets JOIN_SYNC_TIMEOUT_MS
(5s) rather than the whole join: an unreachable control plane leaves
the join to go on with the stored credential.
A join that holds a router succeeds even if its own timeout fires while
a second router is still being tried; only the caller's signal turns
that into a failure. A router cut off by the signal is no longer
shunned.
Refs #732
0 commit comments