improvement(proxy): don't panic on invalid relayURL

Though prior to this change the panic could only happen
if the default relayURL set by the proxy is invalid,
since `datachannelHandler` is only called after a succesful
`checkIsRelayURLAcceptable()`, which ensures that it _is_ valid.
But in the case of invalid default relay URL, a warning is printed
already.
This commit is contained in:
WofWca 2024-09-05 15:34:36 +04:00 committed by David Fifield
parent 71828580bb
commit 0f0f118827

View file

@ -360,7 +360,8 @@ func (sf *SnowflakeProxy) datachannelHandler(conn *webRTCConn, remoteAddr net.Ad
u, err := url.Parse(relayURL)
if err != nil {
log.Fatalf("invalid relay url: %s", err)
log.Printf("invalid relay url: %s", err)
return
}
if remoteAddr != nil {