mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Cleanup file stream cache
This commit is contained in:
parent
f16fa9686c
commit
c5047babca
@ -34,12 +34,11 @@ func NewTranscoder() (*Transcoder, error) {
|
||||
}
|
||||
|
||||
func (t *Transcoder) getFileStream(path string, sha string) (*FileStream, error) {
|
||||
var err error
|
||||
ret, _ := t.streams.GetOrCreate(path, func() *FileStream {
|
||||
ret, _ := t.streams.GetOrCreate(sha, func() *FileStream {
|
||||
return NewFileStream(path, sha)
|
||||
})
|
||||
ret.ready.Wait()
|
||||
if err != nil || ret.err != nil {
|
||||
if ret.err != nil {
|
||||
t.streams.Remove(path)
|
||||
return nil, ret.err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user