diff --git a/server/gamesapi/service/sapi_forward.go b/server/gamesapi/service/sapi_forward.go index 6f3a6977..a62c2aff 100644 --- a/server/gamesapi/service/sapi_forward.go +++ b/server/gamesapi/service/sapi_forward.go @@ -7,6 +7,7 @@ import ( "sync" "sync/atomic" "time" + "math/rand" ) type downStreamHost struct { @@ -189,6 +190,6 @@ func (this *sApiForward) GetDownStreamHost() (string, string) { newUrl := mt.Table.Config.GetById(0).GetRedirectUrl() return newUrl, "" } - downStream := downStreams[0] + downStream := downStreams[rand.Intn(len(downStreams))] return downStream.url, downStream.host }