Skip to content

Commit

Permalink
fix: rand seed for network check (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 authored May 30, 2023
1 parent 46ee320 commit 689fa0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"errors"
"fmt"
"math/rand"
"github.com/mzz2017/softwind/pkg/fastrand"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -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]
})
}
Expand Down

0 comments on commit 689fa0f

Please sign in to comment.