mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-27 08:32:15 +00:00
fix response drain order
Signed-off-by: Tomáš Freund <tomas.freund@datamole.cz>
This commit is contained in:
parent
adb69554a7
commit
09e755e1e5
@ -97,11 +97,11 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
|
||||
|
||||
for _, req := range requests {
|
||||
resp, err := n.client.Do(req)
|
||||
notify.Drain(resp)
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
shouldRetry, err := n.retrier.Check(resp.StatusCode, resp.Body)
|
||||
notify.Drain(resp)
|
||||
if err != nil {
|
||||
return shouldRetry, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user