avoid close closed channel
This commit is contained in:
@@ -185,8 +185,10 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) err
|
|||||||
}
|
}
|
||||||
|
|
||||||
// stop the goroutine
|
// stop the goroutine
|
||||||
fh.dirtyPages.chunkSaveErrChanClosed = true
|
if !fh.dirtyPages.chunkSaveErrChanClosed {
|
||||||
close(fh.dirtyPages.chunkSaveErrChan)
|
fh.dirtyPages.chunkSaveErrChanClosed = true
|
||||||
|
close(fh.dirtyPages.chunkSaveErrChan)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user