Commit 16fa3ecb authored by Matt Holt's avatar Matt Holt Committed by GitHub

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

fastcgi: Fix for #1788. Align atomic fields to 64-bit word (Go bug)
parents 36d8d2c7 dd3f460c
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment