mirror of
https://github.com/coredns/coredns.git
synced 2026-10-27 04:35:43 -04:00
plugin/forward: add startup health checks with start_failed (#8663)
* plugin/forward: add startup health checks with start_failed Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com> * test: separate CoreDNS and third-party imports Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com> --------- Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
"net"
|
||||
"net/http"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/coredns/coredns/plugin/pkg/doh"
|
||||
@@ -130,7 +129,7 @@ func (h *doqHc) Check(p *Proxy) error {
|
||||
return err
|
||||
}
|
||||
|
||||
atomic.StoreUint32(&p.fails, 0)
|
||||
p.resetFails()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -219,7 +218,7 @@ func (h *dnsHc) Check(p *Proxy) error {
|
||||
return err
|
||||
}
|
||||
|
||||
atomic.StoreUint32(&p.fails, 0)
|
||||
p.resetFails()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -293,7 +292,7 @@ func (h *dohHc) Check(p *Proxy) error {
|
||||
return err
|
||||
}
|
||||
|
||||
atomic.StoreUint32(&p.fails, 0)
|
||||
p.resetFails()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user