OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d795f8d
)
Fix seed num one can not dial error
author
Yahtoo Ma
<yahtoo.ma@gmail.com>
Mon, 7 May 2018 12:03:28 +0000
(20:03 +0800)
committer
Yahtoo Ma
<yahtoo.ma@gmail.com>
Tue, 8 May 2018 07:34:07 +0000
(15:34 +0800)
p2p/switch.go
patch
|
blob
|
history
diff --git
a/p2p/switch.go
b/p2p/switch.go
index
861f8d0
..
5947225
100644
(file)
--- a/
p2p/switch.go
+++ b/
p2p/switch.go
@@
-331,7
+331,7
@@
func (sw *Switch) DialSeeds(addrBook *AddrBook, seeds []string) error {
}
//permute the list, dial them in random order.
perm := rand.Perm(len(netAddrs))
- for i := 0; i < len(perm); i+
+
{
+ for i := 0; i < len(perm); i+
=2
{
j := perm[i]
sw.dialSeed(netAddrs[j])
}