From 2f841f89462d7ea6c8834a4e799db50a6ba03d6e Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Tue, 21 Dec 2021 23:22:42 +0300 Subject: [PATCH] Add manual config mangling for worker --- pkg/config/worker/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/config/worker/config.go b/pkg/config/worker/config.go index ab8dc3ce..99c41752 100644 --- a/pkg/config/worker/config.go +++ b/pkg/config/worker/config.go @@ -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() }