Log and handle error with bad tracker URLs
This commit is contained in:
parent
3a17708c78
commit
4fafad46b2
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue