We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6866ff5 commit c3c845eCopy full SHA for c3c845e
internal/itorrents/client.go
@@ -61,6 +61,7 @@ func (c client) Get(ctx context.Context, hash20 protocol.ID) (metainfo.TorrentFi
61
if resErr != nil {
62
return metainfo.TorrentFile{}, fmt.Errorf("failed to request torrent file: %w", reqErr)
63
}
64
+ defer res.Body.Close()
65
if res.StatusCode != http.StatusOK {
66
return metainfo.TorrentFile{}, fmt.Errorf("response status was not OK requesting torrent file: %s", res.Status)
67
0 commit comments