Skip to content

Commit

Permalink
Merge pull request #21 from stapelberg/fixhash
Browse files Browse the repository at this point in the history
Fix hash: use Write, not Sum
  • Loading branch information
d2g authored Jun 22, 2018
2 parents 2cd8a27 + e1fd00d commit b7a004f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func New(options ...func(*Client) error) (*Client, error) {
// Hence, seed a random number generator with the current time and hardware
// address.
h := fnv.New64()
h.Sum(c.hardwareAddr)
h.Write(c.hardwareAddr)
seed := int64(h.Sum64()) + time.Now().Unix()
rnd := rand.New(rand.NewSource(seed))
var rndMu sync.Mutex
Expand Down

0 comments on commit b7a004f

Please sign in to comment.