multi: use timeout field in dialer

This commit is contained in:
yyforyongyu committed 2020-09-16 11:50:04 +08:00
1 parent fb67b58d3f
commit ef38b12fda
7 files changed
+35 -29

No files matched your search

+1 -1
View File
@@ -271,7 +271,7 @@ func (s *server) ConnectPeer(nodePub *btcec.PublicKey, addrs []net.Addr) error {
// Attempt to connect to the peer using this full address. If
// we're unable to connect to them, then we'll try the next
// address in place of it.
err := s.ConnectToPeer(netAddr, true)
err := s.ConnectToPeer(netAddr, true, s.cfg.ConnectionTimeout)
// If we're already connected to this peer, then we don't
// consider this an error, so we'll exit here.