From 0275d3edf2ba1e991813a1cd2bb008ec0aab72f9 Mon Sep 17 00:00:00 2001 From: izouxv Date: Fri, 17 Jan 2025 23:38:09 +0800 Subject: [PATCH] vfs: close the change notify channel on Shutdown --- vfs/vfs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vfs/vfs.go b/vfs/vfs.go index 68b17f483..8907a6e50 100644 --- a/vfs/vfs.go +++ b/vfs/vfs.go @@ -365,6 +365,11 @@ func (vfs *VFS) Shutdown() { activeMu.Unlock() vfs.shutdownCache() + + if vfs.pollChan != nil { + close(vfs.pollChan) + vfs.pollChan = nil + } } // CleanUp deletes the contents of the on disk cache