aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-06 08:36:18 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-06 08:36:18 -0700
commit93df4153a2028e7c6ffee0d005f58db8cec9917a (patch)
tree036d439703c2081b8d5d511e4831960649b78b2a /cmd
parente437e4d42f9d5ce26763afc5f869b8ec7b32c8b1 (diff)
Seed the random number generator
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mobius-hotline-server/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/mobius-hotline-server/main.go b/cmd/mobius-hotline-server/main.go
index aa1f015..285f67b 100644
--- a/cmd/mobius-hotline-server/main.go
+++ b/cmd/mobius-hotline-server/main.go
@@ -7,7 +7,9 @@ import (
"github.com/jhalter/mobius/hotline"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
+ "math/rand"
"os"
+ "time"
)
const (
@@ -16,6 +18,8 @@ const (
)
func main() {
+ rand.Seed(time.Now().UnixNano())
+
ctx, cancelRoot := context.WithCancel(context.Background())
basePort := flag.Int("bind", defaultPort, "Bind address and port")