1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-21 16:56:27 -05:00

add nil check

This commit is contained in:
wuxiang 2018-04-03 17:40:21 +08:00
parent 3f19d09878
commit 4bed69a9b9

View File

@ -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
}