diff --git a/server/gamesapi/mt/Config.go b/server/gamesapi/mt/Config.go index 323fb68f..6f3cde3a 100644 --- a/server/gamesapi/mt/Config.go +++ b/server/gamesapi/mt/Config.go @@ -18,18 +18,22 @@ func (this *ConfigTable) GetGameSApiUrl() string { return this.selfConf.GetGamesapiUrl() } +func (this *ConfigTable) GetRedirectUrl() string { + return this.selfConf.GetRedirectUrl() +} + func (this *ConfigTable) GetSecretKey() string { return this.selfConf.GetSecretKey() } -func (this *ConfigTable) GetMaxConcurrentNum() int32 { - return this.selfConf.GetMaxConcurrentNum() -} - func (this *ConfigTable) GetRedirectSecretKey() string { return this.selfConf.GetRedirectSecretKey() } +func (this *ConfigTable) GetMaxConcurrentNum() int32 { + return this.selfConf.GetMaxConcurrentNum() +} + func (this *ConfigTable) PostInit1() { this.selfConf = this.GetById(int64(0)) if this.selfConf == nil { diff --git a/server/gamesapi/service/sapi_forward.go b/server/gamesapi/service/sapi_forward.go index a2903d26..eefae82d 100644 --- a/server/gamesapi/service/sapi_forward.go +++ b/server/gamesapi/service/sapi_forward.go @@ -223,8 +223,7 @@ func (this *sApiForward) LoadDownStreams() error { func (this *sApiForward) GetDownStreamHost() (string, string) { downStreams := this.downStreams if len(downStreams) <= 0 { - newUrl := mt.Table.Config.GetById(0).GetRedirectUrl() - return newUrl, "" + return mt.Table.Config.GetRedirectUrl(), "" } downStream := downStreams[rand.Intn(len(downStreams))] return downStream.url, downStream.host