fix load balance bug
This commit is contained in:
parent
ff231391d3
commit
9648cd03cf
|
@ -230,7 +230,7 @@ func GetServer(servername string) (*SubscriberConn, bool) {
|
||||||
myLoad := 0
|
myLoad := 0
|
||||||
mySrv := v.(*SubscriberConn)
|
mySrv := v.(*SubscriberConn)
|
||||||
mySrv.Clients.Range(func(k, v interface{}) bool {
|
mySrv.Clients.Range(func(k, v interface{}) bool {
|
||||||
load += 1
|
myLoad += 1
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
// pick the least loaded server
|
// pick the least loaded server
|
||||||
|
|
Loading…
Reference in New Issue