wuxiang 7 rokov pred
rodič
commit
4bed69a9b9
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      stats.go

+ 3 - 1
stats.go

@@ -70,6 +70,8 @@ func (s *syncStatManager) Set(m StatManager) {
 	s.Lock()
 	defer s.Unlock()
 
-	s.StatManager.Close()
+	if s.StatManager != nil {
+		s.StatManager.Close()
+	}
 	s.StatManager = m
 }