mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-05 00:47:51 -05:00
add nil check as other applications
This commit is contained in:
parent
f0862df9a7
commit
6287285c8a
4
stats.go
4
stats.go
@ -64,8 +64,12 @@ func (s *syncStatManager) GetCounter(name string) StatCounter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *syncStatManager) Set(m StatManager) {
|
func (s *syncStatManager) Set(m StatManager) {
|
||||||
|
if m == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
|
||||||
|
s.StatManager.Close()
|
||||||
s.StatManager = m
|
s.StatManager = m
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user