internal: various cleanup
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I48f7eac2e99d1d2af02fcf237401be096a6a6964
This commit is contained in:
parent
0ca9d5b615
commit
56e1935ead
6 changed files with 33 additions and 48 deletions
|
|
@ -152,7 +152,7 @@ func (r *Router) race(storeHash string, candidates []string) (*Result, error) {
|
|||
return
|
||||
}
|
||||
resp.Body.Close()
|
||||
if resp.StatusCode != 200 {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
mu.Lock()
|
||||
notFounds++
|
||||
mu.Unlock()
|
||||
|
|
@ -229,7 +229,7 @@ func (r *Router) fetchNarInfo(upstream, storeHash string) ([]byte, string, strin
|
|||
return nil, "", "", 0
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != 200 {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, "", "", 0
|
||||
}
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue