fix down state handling

This commit is contained in:
Alex
2025-02-10 18:39:45 -05:00
committed by Cuong Manh Le
parent e3b99bf339
commit 41a00c68ac
2 changed files with 2 additions and 2 deletions
+2
View File
@@ -545,9 +545,11 @@ func (p *prog) proxy(ctx context.Context, req *proxyRequest) *proxyResponse {
return nil
}
// if we have an answer, we should reset the failure count
// we dont use reset here since we dont want to prevent failure counts from being incremented
if answer != nil {
p.um.mu.Lock()
p.um.failureReq[upstreams[n]] = 0
p.um.down[upstreams[n]] = false
p.um.mu.Unlock()
}
return answer