We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c6a0aa commit a73dd61Copy full SHA for a73dd61
system/p2p/dht/protocol/peer/peerinfo.go
@@ -143,13 +143,15 @@ func (p *Protocol) detectNodeAddr() {
143
time.Sleep(time.Second)
144
continue
145
}
146
- //启动后间隔1分钟,以充分获得节点外网地址
+ //启动后间隔10秒钟,以充分获得节点外网地址,稳定后间隔10分钟
147
rangeCount++
148
- if rangeCount > 2 {
149
- time.Sleep(time.Minute)
+ if rangeCount > 100 {
+ time.Sleep(time.Minute * 10)
150
+ } else if rangeCount > 2 {
151
+ time.Sleep(time.Second * 10)
152
153
for _, pid := range p.RoutingTable.ListPeers() {
- if p.containsPublicIP(pid) {
154
+ if isPublicIP(p.getPublicIP()) && p.containsPublicIP(pid) {
155
156
157
err := p.queryVersionOld(pid)
0 commit comments