1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-17 13:05:24 +00:00

add nil check as other applications

This commit is contained in:
wuxiang 2018-04-03 17:03:03 +08:00
parent f0862df9a7
commit 6287285c8a

View File

@ -64,8 +64,12 @@ func (s *syncStatManager) GetCounter(name string) StatCounter {
}
func (s *syncStatManager) Set(m StatManager) {
if m == nil {
return
}
s.Lock()
defer s.Unlock()
s.StatManager.Close()
s.StatManager = m
}