Fix broken target scrape error propagation.
This commit is contained in:
parent
3537edee9f
commit
5d55785936
|
@ -138,7 +138,8 @@ func (t *target) Scrape(earliest time.Time, results chan format.Result) (err err
|
|||
done <- true
|
||||
}()
|
||||
|
||||
resp, err := http.Get(t.Address())
|
||||
var resp *http.Response // Don't shadow "err" from the enclosing function.
|
||||
resp, err = http.Get(t.Address())
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue