Skip to content

Commit

Permalink
Fixed a bug when the HTTP request is in timeout (and 10 secs in )
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSec committed Sep 20, 2020
1 parent 0c6f0f6 commit c0e3edb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ func Scan(cmd *cobra.Command, args []string) {
})
}
}
_ = httpResponse.Body.Close()
}
_ = httpResponse.Body.Close()
}
}(urlList[i])
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func HTTPGet(insecure bool, url string, followRedirects bool, timeout int) (*htt
}
var netClient = &http.Client{
Transport: tr,
Timeout: time.Second * time.Duration(timeout),
Timeout: time.Second * 10,
}

// If we don't want to follow HTTP redirects
Expand Down

0 comments on commit c0e3edb

Please sign in to comment.