mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 14:19:54 +05:00
Make the s.sTerminator.endChan nil after we close it
This commit is contained in:
committed by
Dan Christian Bogos
parent
3882b0408d
commit
11efcce841
@@ -767,6 +767,7 @@ func (sS *SessionS) unregisterSession(cgrID string, passive bool) bool {
|
||||
if s.sTerminator != nil &&
|
||||
s.sTerminator.endChan != nil {
|
||||
close(s.sTerminator.endChan)
|
||||
s.sTerminator.endChan = nil
|
||||
time.Sleep(1) // ensure context switching so that the goroutine can remove old terminator
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user