Reset registry retries when refreshing Noise bundles (#39852)

## Why

Refreshing a Noise rendezvous bundle after an unauthorized handshake inherited
the initial registry lookup's retry count. If that lookup had exhausted its
retries, a transient registry error during the refresh failed immediately.

## What changed

Reset the registry retry count along with the operation deadline before
requesting a replacement bundle after a `401` handshake response.

## Testing

Extend the initial Noise connection test to exhaust the first lookup's retry
budget, receive a `401`, then verify that an offline replacement lookup is
retried and connects successfully.

GitOrigin-RevId: bcfad50ea32d69855f1c2c4c461022b3ecbbd941
This commit is contained in:
richardopenai authored and copyberry committed 2026-08-21 03:47:37 +00:00
1 parent 27c05a52e0
commit 2151d3a5b7
3 files changed
+187 -233

No files matched your search

@@ -314,6 +314,7 @@ impl ExecServerClient {
{
refreshed_unauthorized_bundle = true;
deadline = Instant::now() + INITIAL_REGISTRY_OPERATION_TIMEOUT;
retries = 0;
result = connect_bundle().await;
}
result => return result,