Commit bbb5a6ac authored by Arlo Breault's avatar Arlo Breault
Browse files

webrtc.NewIceServer already does this split / validation

It also expects to be called with a non-empty string, which isn't
the case with this Split which always envokes the loop at least
once.  If -ice was omitted, an error was logged.
parent 58556dc0
......@@ -145,11 +145,8 @@ func main() {
log.Println("\n\n\n --- Starting Snowflake Client ---")
var iceServers IceServerList
log.Println("IceServerList:")
for _, server := range strings.Split(*iceServersCommas, ",") {
// TODO: STUN / TURN url format validation?
log.Println(server)
option := webrtc.OptionIceServer(server)
if len(strings.TrimSpace(*iceServersCommas)) > 0 {
option := webrtc.OptionIceServer(*iceServersCommas)
iceServers = append(iceServers, option)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment