0x4a52466c696e74 %!s(int64=2) %!d(string=hai) anos
pai
achega
a2f2134e5c
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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() {
 func (s *CacheMap) cleanWorker() {
+	defer func() {
+		for _, v := range s.cleanChans {
+			close(v)
+		}
+	}()
 	t := time.NewTicker(s.live)
 	t := time.NewTicker(s.live)
 loop:
 loop:
 	for {
 	for {