mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 00:23:18 +00:00
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
Block a user