From 9af27883df0dab6713e7629aacf97269bec7edab Mon Sep 17 00:00:00 2001 From: riccardom Date: Wed, 7 Oct 2026 13:22:59 +0200 Subject: [PATCH] [client] pqkem: correct the convergence-deadline comment The loop declares failure on the tick after the last retransmit, so the deadline is (MaxRetries+1) * RetryInterval, not MaxRetries * RetryInterval. Found in cubic review on #7098 (client/internal/pqkem/manager.go:19). --- client/internal/pqkem/manager.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/internal/pqkem/manager.go b/client/internal/pqkem/manager.go index 7e4b411d2..2ebfbc154 100644 --- a/client/internal/pqkem/manager.go +++ b/client/internal/pqkem/manager.go @@ -14,8 +14,9 @@ const ( // DefaultRetryInterval is how often the initiator retransmits its outstanding // data-path offer while awaiting the answer. DefaultRetryInterval = 2 * time.Second - // DefaultMaxRetries bounds how many ticks an exchange may run before it is - // declared failed. The convergence deadline is thus MaxRetries * RetryInterval. + // DefaultMaxRetries is how many times the initiator retransmits its outstanding + // offer while awaiting the answer. Failure is declared on the tick after the last + // retransmit, so the convergence deadline is (MaxRetries+1) * RetryInterval. DefaultMaxRetries = 10 // DefaultMaxRekeyFailures is how many consecutive rekey (non-initial) failures // are tolerated before OnRekeyFailed. The initial exchange fails immediately.