proxy: lock should be above the fields it protects.

pull/6/head
Burcu Dogan 2014-07-11 00:23:43 -07:00
parent 6a2703627b
commit 1816a63d55
1 changed files with 1 additions and 2 deletions

View File

@ -32,10 +32,9 @@ import (
// LoadBalancerRR is a round-robin load balancer.
type LoadBalancerRR struct {
lock sync.RWMutex
endpointsMap map[string][]string
rrIndex map[string]int
lock sync.RWMutex
}
// NewLoadBalancerRR returns a new LoadBalancerRR.