Skip to content

Commit 09e755e

Browse files
committed
fix response drain order
Signed-off-by: Tomáš Freund <[email protected]>
1 parent adb6955 commit 09e755e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notify/opsgenie/opsgenie.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
9797

9898
for _, req := range requests {
9999
resp, err := n.client.Do(req)
100-
notify.Drain(resp)
101100
if err != nil {
102101
return true, err
103102
}
104103
shouldRetry, err := n.retrier.Check(resp.StatusCode, resp.Body)
104+
notify.Drain(resp)
105105
if err != nil {
106106
return shouldRetry, err
107107
}

0 commit comments

Comments
 (0)