Adder missing returns, omg

master
Víctor Zamanillo 2020-12-13 21:32:54 +01:00
parent 2c6fe5f248
commit 9064057c69
1 changed files with 2 additions and 0 deletions

View File

@ -35,12 +35,14 @@ func (a *agent) enumerate(ctx context.Context, baseURL string) {
if err != nil && !isnotfound {
a.results <- subscraping.Result{Source: "sitedossier", Type: subscraping.Error, Error: err}
a.session.DiscardHTTPResponse(resp)
return
}
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
a.results <- subscraping.Result{Source: "sitedossier", Type: subscraping.Error, Error: err}
resp.Body.Close()
return
}
resp.Body.Close()