Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Seed random-number generator from the host time #1068

Merged
merged 1 commit into from
Jul 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ipam/ring/ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"io"
"math/rand"
"sort"
"time"

"github.com/weaveworks/weave/common"
"github.com/weaveworks/weave/ipam/address"
Expand Down Expand Up @@ -518,3 +519,7 @@ func (r *Ring) PeerNames() map[router.PeerName]struct{} {

return res
}

func init() {
rand.Seed(time.Now().UTC().UnixNano())
}