diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-06-06 08:36:18 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-06-06 08:36:18 -0700 |
| commit | 93df4153a2028e7c6ffee0d005f58db8cec9917a (patch) | |
| tree | 036d439703c2081b8d5d511e4831960649b78b2a /cmd/mobius-hotline-server | |
| parent | e437e4d42f9d5ce26763afc5f869b8ec7b32c8b1 (diff) | |
Seed the random number generator
Diffstat (limited to 'cmd/mobius-hotline-server')
| -rw-r--r-- | cmd/mobius-hotline-server/main.go | 4 |
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") |