Ensure random seed is planted

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

View File

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