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