Skip to content

Commit e5adcc5

Browse files
committed
nilaway
1 parent 708243e commit e5adcc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httphelpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func (r *httpRequest) makeRequest(ctx context.Context, method string, payload pa
317317
if err != nil {
318318
var urlErr *url.Error
319319
if errors.As(err, &urlErr) {
320-
if errors.Is(urlErr.Err, io.EOF) {
320+
if urlErr != nil && errors.Is(urlErr.Err, io.EOF) {
321321
return nil, errors.Wrap(err, "remote server prematurely closed connection")
322322
}
323323
}

0 commit comments

Comments
 (0)