fix http client concurrency issue in fetcher

This commit is contained in:
Adrian Stobbe 2023-05-20 00:55:29 +02:00
parent 0f942bafca
commit 04e87973ec

View File

@ -30,7 +30,7 @@ type Fetcher struct {
// NewFetcher returns a new Fetcher.
func NewFetcher() *Fetcher {
return &Fetcher{
httpc: http.DefaultClient,
httpc: &http.Client{Transport: &http.Transport{DisableKeepAlives: true}}, // DisableKeepAlives fixes concurrency issue see https://stackoverflow.com/a/75816347
}
}