docs: the first reconnect delay is 500ms, not ~1s

Caught in review. Cosmetic, but a comment that misstates the constant
beside it is the kind of thing the next reader trusts instead of the
code.
This commit is contained in:
atlas 2026-08-16 21:28:50 +02:00
commit 6cbabc3515

View file

@ -436,7 +436,7 @@ pub async fn connect(cfg: QueueConfig) -> Result<async_nats::Client, Error> {
// See `MAX_RECONNECT_DELAY`. The library's default clamps at 4s forever,
// which turns an unreachable queue into a permanent 4s poll — and, before
// the cache above, a permanent 4s token-request loop against authelia.
// Exponential from ~1s so a momentary blip still reconnects promptly.
// Exponential from 500ms so a momentary blip still reconnects promptly.
.reconnect_delay_callback(|attempts| {
let exp = u32::try_from(attempts.saturating_sub(1)).unwrap_or(u32::MAX);
std::cmp::min(