Ensure random seed is planted

This commit is contained in:
Dave Gallant
2020-12-31 03:27:01 -05:00
parent a2afbc1e35
commit c44dbaa92b

View File

@@ -2,6 +2,7 @@ package cmd
import ( import (
"encoding/base64" "encoding/base64"
"time"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
@@ -52,7 +53,8 @@ var connectCmd = &cobra.Command{
if flagRandom { if flagRandom {
// Select a random server // Select a random server
serverSelected = (*vpnServers)[rand.Intn(len(*vpnServers))] rand.Seed(time.Now().UnixNano())
serverSelected = (*vpnServers)[rand.Intn(50)]
} else { } else {
if len(args) > 0 { if len(args) > 0 {