Browse Source

p2p: switch - reconnect only if persistent

pull/1404/head
Javed Khan 7 years ago
parent
commit
54adb790f2
No known key found for this signature in database GPG Key ID: 7E31745B904584E6
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      p2p/switch.go

+ 3
- 1
p2p/switch.go View File

@ -476,7 +476,9 @@ func (sw *Switch) addOutboundPeerWithConfig(addr *NetAddress, config *PeerConfig
peerConn, err := newOutboundPeerConn(addr, config, persistent, sw.nodeKey.PrivKey)
if err != nil {
sw.Logger.Error("Failed to dial peer", "address", addr, "err", err)
go sw.reconnectToPeer(addr)
if persistent {
go sw.reconnectToPeer(addr)
}
return err
}


Loading…
Cancel
Save