[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).
This commit is contained in:
riccardom
2026-10-07 13:22:59 +02:00
parent a575a8fa28
commit 9af27883df
+3 -2
View File
@@ -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.