Archived
2
0

GetIP if config empty

This commit is contained in:
Craig 2020-02-14 03:50:53 +00:00
parent 559a858893
commit 1080ee8425

View File

@ -131,9 +131,11 @@ func (s *WebRTC) Set() {
s.VideoParams = viper.GetString("vparams") s.VideoParams = viper.GetString("vparams")
s.NAT1To1IPs = viper.GetStringSlice("ip") s.NAT1To1IPs = viper.GetStringSlice("ip")
ip, err := utils.GetIP() if len(s.NAT1To1IPs) == 0 {
if err == nil { ip, err := utils.GetIP()
s.NAT1To1IPs = append(s.NAT1To1IPs, ip) if err == nil {
s.NAT1To1IPs = append(s.NAT1To1IPs, ip)
}
} }
min := uint16(59000) min := uint16(59000)