Merge pull request #1789 from abiosoft/fix-atomic-add

fastcgi: Fix for #1788. Align atomic fields to 64-bit word (Go bug)
This commit is contained in:
Matt Holt 2017-07-28 11:53:21 -06:00 committed by GitHub
commit 16fa3ecb0f

View file

@ -366,8 +366,11 @@ type balancer interface {
// roundRobin is a round robin balancer for fastcgi upstreams.
type roundRobin struct {
addresses []string
// Known Go bug: https://golang.org/pkg/sync/atomic/#pkg-note-BUG
// must be first field for 64 bit alignment
// on x86 and arm.
index int64
addresses []string
}
func (r *roundRobin) Address() string {