summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy/hosts.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-08-07 18:02:24 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-08-07 18:02:24 -0600
commite2f913bb7f813ac2f79cd3644066eff3815accd4 (patch)
tree7576bd5463924d88637ec822e40dd94966fc1211 /modules/caddyhttp/reverseproxy/hosts.go
parent65a09524c3926547ed0b8515da211173df4fe379 (diff)
reverseproxy: Minor fixes and cleanup
Now use context cancellation to stop active health checker, which is simpler than and just as effective as using a separate stop channel.
Diffstat (limited to 'modules/caddyhttp/reverseproxy/hosts.go')
-rw-r--r--modules/caddyhttp/reverseproxy/hosts.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/hosts.go b/modules/caddyhttp/reverseproxy/hosts.go
index 23759d1..5870b75 100644
--- a/modules/caddyhttp/reverseproxy/hosts.go
+++ b/modules/caddyhttp/reverseproxy/hosts.go
@@ -177,7 +177,7 @@ func (u *Upstream) fillDialInfo(r *http.Request) (DialInfo, error) {
// of the state of a remote host. It implements the
// Host interface.
type upstreamHost struct {
- numRequests int64 // must be first field to be 64-bit aligned on 32-bit systems (see https://golang.org/pkg/sync/atomic/#pkg-note-BUG)
+ numRequests int64 // must be 64-bit aligned on 32-bit systems (see https://golang.org/pkg/sync/atomic/#pkg-note-BUG)
fails int64
unhealthy int32
}