Fix race conditions during in-flight size checks (#3505)

This commit is contained in:
Patrick Schmidt
2022-08-25 05:03:34 +02:00
committed by GitHub
parent 7b424a54dc
commit 2930263dfd
3 changed files with 22 additions and 13 deletions

View File

@@ -186,8 +186,8 @@ func (s *SingleChunkCacher) destroy() {
if s.data != nil {
mem.Free(s.data)
s.data = nil
close(s.cacheStartedCh)
}
close(s.cacheStartedCh)
}
func (s *SingleChunkCacher) readChunkAt(buf []byte, offset int64) (int, error) {