This commit is contained in:
aozhiwei 2024-08-30 17:16:23 +08:00
parent 4928103c06
commit 2bf64f4b70
2 changed files with 9 additions and 6 deletions

View File

@ -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 {

View File

@ -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