Fix panic when failing to parse tracker URL
This commit is contained in:
parent
e0f0617b0b
commit
316640f921
|
@ -1296,6 +1296,9 @@ func (t *Torrent) startScrapingTracker(_url string) {
|
||||||
u, err := url.Parse(_url)
|
u, err := url.Parse(_url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Str("error parsing tracker url").AddValues("url", _url).Log(t.logger)
|
log.Str("error parsing tracker url").AddValues("url", _url).Log(t.logger)
|
||||||
|
// TODO: Handle urls with leading '*', some kind of silly uTorrent
|
||||||
|
// convention?
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if u.Scheme == "udp" {
|
if u.Scheme == "udp" {
|
||||||
u.Scheme = "udp4"
|
u.Scheme = "udp4"
|
||||||
|
|
Loading…
Reference in New Issue