Close download body
This commit is contained in:
@@ -178,6 +178,8 @@ func (dl *Downloader) streamFileToResponse(torrent *intTor.Torrent, file *intTor
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer download.Body.Close()
|
||||||
|
|
||||||
if download.StatusCode != http.StatusOK && download.StatusCode != http.StatusPartialContent {
|
if download.StatusCode != http.StatusOK && download.StatusCode != http.StatusPartialContent {
|
||||||
if file != nil && unrestrict.Streamable == 1 {
|
if file != nil && unrestrict.Streamable == 1 {
|
||||||
log.Warnf("Received a %s status code for file %s", download.Status, file.Path)
|
log.Warnf("Received a %s status code for file %s", download.Status, file.Path)
|
||||||
|
|||||||
Reference in New Issue
Block a user