don't spin forever looking for peers (#724)
This commit is contained in:
parent
7c4b169faa
commit
47ced81d44
1 changed files with 6 additions and 6 deletions
12
server.go
12
server.go
|
@ -1826,12 +1826,6 @@ out:
|
|||
break
|
||||
}
|
||||
|
||||
// Check that we don't have a pending connection to this addr.
|
||||
addrStr := addrmgr.NetAddressKey(addr.NetAddress())
|
||||
if _, ok := state.pendingPeers[addrStr]; ok {
|
||||
continue
|
||||
}
|
||||
|
||||
tries++
|
||||
// After 100 bad tries exit the loop and we'll try again
|
||||
// later.
|
||||
|
@ -1839,6 +1833,12 @@ out:
|
|||
break
|
||||
}
|
||||
|
||||
// Check that we don't have a pending connection to this addr.
|
||||
addrStr := addrmgr.NetAddressKey(addr.NetAddress())
|
||||
if _, ok := state.pendingPeers[addrStr]; ok {
|
||||
continue
|
||||
}
|
||||
|
||||
// XXX if we have limited that address skip
|
||||
|
||||
// only allow recent nodes (10mins) after we failed 30
|
||||
|
|
Loading…
Add table
Reference in a new issue