aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-06-05 17:21:09 +0100
committerGravatar GitHub <noreply@github.com> 2018-06-05 17:21:09 +0100
commit751a08d6a2e3ace62e40ed8170015e7051d0020c (patch)
tree5cfb8cf60e6ab28bc9792dd4e06e5dea3871d0c7
parentec334014d73222981ef84667f0e82d04d1033537 (diff)
downloadcoredns-751a08d6a2e3ace62e40ed8170015e7051d0020c.tar.gz
coredns-751a08d6a2e3ace62e40ed8170015e7051d0020c.tar.zst
coredns-751a08d6a2e3ace62e40ed8170015e7051d0020c.zip
plugin/forward: fix alignment for sync.Atomic (#1855)
These must be alligned on 8 bytes, in Go this means putting them first in the struct (AFAICT).
-rw-r--r--plugin/forward/proxy.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/forward/proxy.go b/plugin/forward/proxy.go
index 5e85d4969..df1f7ae97 100644
--- a/plugin/forward/proxy.go
+++ b/plugin/forward/proxy.go
@@ -13,6 +13,9 @@ import (
// Proxy defines an upstream host.
type Proxy struct {
+ avgRtt int64
+ fails uint32
+
addr string
client *dns.Client
@@ -22,9 +25,6 @@ type Proxy struct {
// health checking
probe *up.Probe
- fails uint32
-
- avgRtt int64
}
// NewProxy returns a new proxy.