mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 11:55:42 +03:00
Seed the servers random number generator
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
"net"
|
||||
"net/rpc"
|
||||
"os"
|
||||
@@ -247,6 +248,9 @@ func NewServer(config *Config) (*Server, error) {
|
||||
// Emit metrics
|
||||
go s.heartbeatStats()
|
||||
|
||||
// Seed the global random.
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
// Done
|
||||
return s, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user