Small refactors
This commit is contained in:
@@ -258,13 +258,13 @@ func (dl *Downloader) streamFileToResponse(
|
||||
return
|
||||
}
|
||||
|
||||
dl.workerPool.Submit(func() {
|
||||
go func() {
|
||||
dl.TrafficServed.Add(uint64(n))
|
||||
|
||||
if cfg.ShouldLogRequests() && bToMb(uint64(n)) > 0 {
|
||||
log.Debugf("Served %d MB of file %s (range=%s)", bToMb(uint64(n)), unrestrict.Filename, req.Header.Get("Range"))
|
||||
}
|
||||
})
|
||||
}()
|
||||
}
|
||||
|
||||
func redirect(resp http.ResponseWriter, req *http.Request, url string) {
|
||||
|
||||
Reference in New Issue
Block a user