diff --git a/sessions/sessions.go b/sessions/sessions.go index b98a77f70..ccbb2b553 100644 --- a/sessions/sessions.go +++ b/sessions/sessions.go @@ -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 } }