mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
优化模块释放顺序
This commit is contained in:
@@ -264,12 +264,11 @@ func (s *Service) Release() {
|
||||
}
|
||||
}()
|
||||
|
||||
for i:=len(s.child)-1; i>=0; i-- {
|
||||
s.ReleaseModule(s.child[i].GetModuleId())
|
||||
}
|
||||
|
||||
if atomic.AddInt32(&s.isRelease, -1) == -1 {
|
||||
s.self.OnRelease()
|
||||
for i:=len(s.child)-1; i>=0; i-- {
|
||||
s.ReleaseModule(s.child[i].GetModuleId())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user