Fix panic when failing to parse tracker URL

This commit is contained in:
Matt Joiner 2018-07-07 11:35:47 +10:00
parent e0f0617b0b
commit 316640f921
1 changed files with 3 additions and 0 deletions

View File

@ -1296,6 +1296,9 @@ func (t *Torrent) startScrapingTracker(_url string) {
u, err := url.Parse(_url)
if err != nil {
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" {
u.Scheme = "udp4"