mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated syncSessions
This commit is contained in:
@@ -1237,6 +1237,12 @@ func (sS *SessionS) getRelocateSession(cgrID string, initOriginID,
|
||||
// syncSessions synchronizes the active sessions with the one in the clients
|
||||
// it will force-disconnect the one found in SessionS but not in clients
|
||||
func (sS *SessionS) syncSessions() {
|
||||
sS.aSsMux.RLock()
|
||||
asCount := len(sS.aSessions)
|
||||
sS.aSsMux.RUnlock()
|
||||
if asCount == 0 { // no need to sync the sessions if none is active
|
||||
return
|
||||
}
|
||||
queriedCGRIDs := engine.NewSafEvent(nil) // need this to be
|
||||
var err error
|
||||
for _, clnt := range sS.biJClients() {
|
||||
|
||||
Reference in New Issue
Block a user