mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Changed the function in order to cover
This commit is contained in:
committed by
Dan Christian Bogos
parent
7465f25ba0
commit
5e0e52a456
@@ -1331,7 +1331,6 @@ func (sS *SessionS) syncSessions() {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> timeout quering session ids ", utils.SessionS))
|
||||
}
|
||||
|
||||
}
|
||||
var toBeRemoved []string
|
||||
sS.aSsMux.RLock()
|
||||
@@ -1341,6 +1340,11 @@ func (sS *SessionS) syncSessions() {
|
||||
}
|
||||
}
|
||||
sS.aSsMux.RUnlock()
|
||||
sS.terminateSyncSessions(toBeRemoved)
|
||||
}
|
||||
|
||||
// Extracted from syncSessions in order to test all cases
|
||||
func (sS *SessionS) terminateSyncSessions(toBeRemoved []string) {
|
||||
for _, cgrID := range toBeRemoved {
|
||||
ss := sS.getSessions(cgrID, false)
|
||||
if len(ss) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user