From 9648cd03cf8b8794cfd549efb7b5aa93c157d848 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 15 Jul 2020 11:00:21 +0000 Subject: [PATCH] fix load balance bug --- table/table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table/table.go b/table/table.go index 174360b..57032eb 100644 --- a/table/table.go +++ b/table/table.go @@ -230,7 +230,7 @@ func GetServer(servername string) (*SubscriberConn, bool) { myLoad := 0 mySrv := v.(*SubscriberConn) mySrv.Clients.Range(func(k, v interface{}) bool { - load += 1 + myLoad += 1 return true }) // pick the least loaded server