Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion va/va.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ func (va *ValidationAuthorityImpl) doRemoteOperation(ctx context.Context, op rem
var failed []string
var passedRIRs = map[string]struct{}{}
var firstProb *probs.ProblemDetails
var slowTimerSet bool

for resp := range responses {
var currProb *probs.ProblemDetails
Expand Down Expand Up @@ -606,13 +607,14 @@ func (va *ValidationAuthorityImpl) doRemoteOperation(ctx context.Context, op rem
firstProb = currProb
}

if va.slowRemoteTimeout != 0 {
if va.slowRemoteTimeout != 0 && !slowTimerSet {
// If enough perspectives have passed, or enough perspectives have
// failed, set a tighter deadline for the remaining perspectives.
if (len(passed) >= required && len(passedRIRs) >= requiredRIRs) ||
(len(failed) > remoteVACount-required) {
timer := time.AfterFunc(va.slowRemoteTimeout, cancel)
defer timer.Stop()
slowTimerSet = true
}
}

Expand Down
Loading