Browse Source

in progress

0x4a52466c696e74 1 year ago
parent
commit
a2f2134e5c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      cache/cachemap.go

+ 5 - 0
cache/cachemap.go

@@ -81,6 +81,11 @@ func (s *CacheMap) EventCleaner() <-chan map[any]any {
 }
 
 func (s *CacheMap) cleanWorker() {
+	defer func() {
+		for _, v := range s.cleanChans {
+			close(v)
+		}
+	}()
 	t := time.NewTicker(s.live)
 loop:
 	for {