cmd/tracker-announce: Provide a http.Client for announces

This commit is contained in:
Matt Joiner 2018-08-13 20:27:16 +10:00
parent 8b4a4193a8
commit 975fa8f143
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package main
import ( import (
"log" "log"
"math" "math"
"net/http"
"net/url" "net/url"
"strings" "strings"
"sync" "sync"
@ -80,6 +81,7 @@ func announces(uri string, ar tracker.AnnounceRequest) (ret []announceResult) {
a := tracker.Announce{ a := tracker.Announce{
Request: ar, Request: ar,
TrackerUrl: uri, TrackerUrl: uri,
HttpClient: http.DefaultClient,
} }
if u.Scheme == "udp" { if u.Scheme == "udp" {
a.UdpNetwork = "udp4" a.UdpNetwork = "udp4"