mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
middleware/proxy: fix race; add Go 1.7 backward compatibility (#603)
* Fix race on backend health status update * Ensure test case is compatible on Go 1.7
This commit is contained in:
committed by
Miek Gieben
parent
dfc71df07d
commit
7dc431ada3
@@ -3,6 +3,7 @@ package proxy
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
@@ -59,6 +60,7 @@ type UpstreamHost struct {
|
||||
Unhealthy bool
|
||||
CheckDown UpstreamHostDownFunc
|
||||
WithoutPathPrefix string
|
||||
checkMu sync.Mutex
|
||||
}
|
||||
|
||||
// Down checks whether the upstream host is down or not.
|
||||
|
||||
Reference in New Issue
Block a user