From: Matt Joiner Date: Sun, 17 Jun 2018 06:19:24 +0000 (+1000) Subject: Log and handle error with bad tracker URLs X-Git-Tag: v1.0.0~127^2~8 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=4fafad46b25d1c3c6d57657298ae0ca8b2c9c9e6;p=btrtrc.git Log and handle error with bad tracker URLs --- diff --git a/torrent.go b/torrent.go index 2a002d41..aec85f87 100644 --- a/torrent.go +++ b/torrent.go @@ -1284,7 +1284,10 @@ func (t *Torrent) startScrapingTracker(_url string) { if _url == "" { return } - u, _ := url.Parse(_url) + u, err := url.Parse(_url) + if err != nil { + log.Str("error parsing tracker url").AddValues("url", _url).Log(t.logger) + } if u.Scheme == "udp" { u.Scheme = "udp4" t.startScrapingTracker(u.String())