From f22cf7de8b38ebc2d58f8cf2f096f9265735e1ef Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 30 Jun 2024 19:52:53 +1000 Subject: [PATCH] Fix shadowed error in webseed response handling --- webseed/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webseed/client.go b/webseed/client.go index 7740fb8ed9..c58f7124d9 100644 --- a/webseed/client.go +++ b/webseed/client.go @@ -176,10 +176,11 @@ var ErrTooFast = errors.New("making requests too fast") func readRequestPartResponses(ctx context.Context, parts []requestPart) (_ []byte, err error) { var buf bytes.Buffer for _, part := range parts { - result, err := part.do() + var resp *http.Response + resp, err = part.do() if err == nil { - err = recvPartResult(ctx, &buf, part, result) + err = recvPartResult(ctx, &buf, part, resp) } if err != nil {