mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 21:54:59 +07:00
fix: rand seed for network check (#106)
This commit is contained in:
parent
46ee3201c4
commit
689fa0f01c
@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"github.com/mzz2017/softwind/pkg/fastrand"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -45,7 +45,7 @@ func init() {
|
||||
runCmd.PersistentFlags().BoolVarP(&disableTimestamp, "disable-timestamp", "", false, "disable timestamp")
|
||||
runCmd.PersistentFlags().BoolVarP(&disableTimestamp, "disable-pidfile", "", false, "not generate /var/run/dae.pid")
|
||||
|
||||
rand.Shuffle(len(CheckNetworkLinks), func(i, j int) {
|
||||
fastrand.Rand().Shuffle(len(CheckNetworkLinks), func(i, j int) {
|
||||
CheckNetworkLinks[i], CheckNetworkLinks[j] = CheckNetworkLinks[j], CheckNetworkLinks[i]
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user