Skip to content

Commit 14778cc

Browse files
authored
fix: skip nil response (#2705)
1 parent e12c9fc commit 14778cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/setup.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ func checkRetry(ctx context.Context, resp *http.Response, err error) (bool, erro
180180
return rt, err
181181
}
182182

183+
if resp == nil {
184+
return rt, nil
185+
}
186+
183187
if resp.StatusCode/100 == 2 {
184188
return rt, nil
185189
}

0 commit comments

Comments
 (0)