Merge pull request #1068 from weaveworks/1004-seed-random

Seed random-number generator from the host time

Fixes #1004.
This commit is contained in:
Matthias Radestock committed 2015-07-03 16:01:16 +01:00
commit 1524796408
1 file changed
+5
+5
View File
@@ -10,6 +10,7 @@ import (
"io"
"math/rand"
"sort"
"time"
"github.com/weaveworks/weave/common"
"github.com/weaveworks/weave/ipam/address"
@@ -518,3 +519,7 @@ func (r *Ring) PeerNames() map[router.PeerName]struct{} {
return res
}
func init() {
rand.Seed(time.Now().UTC().UnixNano())
}