fix stats worker closed condition (#3965)

* fix stats worker closed condition

* test

* tidy
This commit is contained in:
Paul Wells
2025-09-29 02:51:58 -07:00
committed by GitHub
parent 3d73703152
commit b3ee219ccb
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ func (s *StatsWorker) Close(guard *ReferenceGuard) bool {
func (s *StatsWorker) Closed(guard *ReferenceGuard) bool {
s.lock.Lock()
defer s.lock.Unlock()
if !s.closedAt.IsZero() {
if s.closedAt.IsZero() {
s.refCount.Activate(guard)
return false
}