Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #11 from filecoin-saturn/fix/panic-pool
Browse files Browse the repository at this point in the history
fix: panic in pool.go
  • Loading branch information
willscott authored Feb 7, 2023
2 parents 741a974 + 935a4e5 commit f4e70ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ func (p *pool) doFetch(ctx context.Context, from string, c cid.Cid) (b blocks.Bl
"Accept": []string{"application/vnd.ipld.raw"},
},
})
fb = time.Now()
code = resp.StatusCode
proto = resp.Proto
if err != nil {
return nil, err
}
fb = time.Now()
code = resp.StatusCode
proto = resp.Proto
respReq = resp.Request
defer resp.Body.Close()
rb, err := io.ReadAll(resp.Body)
Expand Down

0 comments on commit f4e70ac

Please sign in to comment.