each goroutine needs its own random source.
caught by the race detector.
This commit is contained in:
parent
bd7a100ebb
commit
ba937630d0
1 changed files with 2 additions and 1 deletions
|
@ -499,9 +499,10 @@ func (s *server) seedFromDNS() {
|
|||
return
|
||||
}
|
||||
|
||||
randSource := mrand.New(mrand.NewSource(time.Now().UnixNano()))
|
||||
for _, seeder := range activeNetParams.dnsSeeds {
|
||||
go func(seeder string) {
|
||||
randSource := mrand.New(mrand.NewSource(time.Now().UnixNano()))
|
||||
|
||||
seedpeers, err := dnsDiscover(seeder)
|
||||
if err != nil {
|
||||
discLog.Infof("DNS discovery failed on seed %s: %v", seeder, err)
|
||||
|
|
Loading…
Reference in a new issue