Remove deprecated rand.Seed function

This commit is contained in:
ionutboangiu
2023-10-02 08:36:41 -04:00
committed by Dan Christian Bogos
parent 29fccbb6c7
commit d396da9214
2 changed files with 1 additions and 2 deletions

View File

@@ -856,7 +856,7 @@ func TestSmgJsonCfg(t *testing.T) {
if cfg, err := dfCgrJSONCfg.SessionSJsonCfg(); err != nil {
t.Error(err)
} else if !reflect.DeepEqual(eCfg, cfg) {
t.Error(fmt.Sprintf("Expecting: %s, received: %s", utils.ToJSON(eCfg), utils.ToJSON(cfg)))
t.Errorf("Expecting: %s, received: %s", utils.ToJSON(eCfg), utils.ToJSON(cfg))
}
}

View File

@@ -1416,7 +1416,6 @@ func (sS *SessionS) terminateSyncSessions(toBeRemoved []string) {
}
var eUsage time.Duration
if sS.cgrCfg.SessionSCfg().StaleChanMaxExtraUsage > 0 { // add extra usage
rand.Seed(time.Now().Unix())
eUsage += time.Duration(
rand.Int63n(sS.cgrCfg.SessionSCfg().StaleChanMaxExtraUsage.Milliseconds()) * time.Millisecond.Nanoseconds())
}