mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-30 05:23:08 +00:00
Add manual config mangling for worker
This commit is contained in:
parent
f688f3c5f4
commit
2f841f8946
1 changed files with 9 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ var configPath string
|
|||
func NewConfig() (conf Config) {
|
||||
_ = config.LoadConfig(&conf, configPath)
|
||||
conf.expandSpecialTags()
|
||||
conf.fixValues()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +78,14 @@ func (c *Config) expandSpecialTags() {
|
|||
}
|
||||
}
|
||||
|
||||
// fixValues tries to fix some values otherwise hard to set externally.
|
||||
func (c *Config) fixValues() {
|
||||
// with ICE lite we clear ICE servers
|
||||
if c.Webrtc.IceLite {
|
||||
c.Webrtc.IceServers = []webrtcConfig.IceServer{}
|
||||
}
|
||||
}
|
||||
|
||||
// GetAddr returns defined in the config server address.
|
||||
func (w *Worker) GetAddr() string { return w.Server.GetAddr() }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue