Skip to content

Commit 0fd2898

Browse files
committed
feat: implement http client timeout of 10 seconds
1 parent 25ede1e commit 0fd2898

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/geizhals/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func downloadEntity(url EntityURL) (Entity, error) {
6565
// downloadHTML downloads the HTML content of the given URL and returns the document and the HTTP status code.
6666
func downloadHTML(entityURL string) (*goquery.Document, int, error) {
6767
proxyURL := proxy.GetNextProxy()
68-
httpClient := &http.Client{}
68+
httpClient := &http.Client{Timeout: time.Second * 10}
6969

7070
if proxyURL != nil {
7171
log.Println("Using proxy: ", proxyURL)

0 commit comments

Comments
 (0)