Closed Ivanezko closed 3 months ago
Alright I'll take a look
This happens to me sometimes too, it's a race condition. We could check to send only if the channel is open, but there are other panics that need to be handled differently. I could work on this
func (c *CancelableReader) Read(p []byte) (int, error) {
select {
case <-c.ctx.Done():
return 0, c.ctx.Err()
case c.sizeWant <- len(p):
}
select {
case <-c.ctx.Done():
...
sure, for now Ii have added the check on close
Describe the bug
To Reproduce Steps to reproduce the behavior: Start download videos 5 threads, 1Mb chunk After about 30 minutes and 5-6 downloaded videos get panic