Update dial timeout

This commit is contained in:
mcrakhman 2023-05-29 16:28:28 +02:00
parent e148577aed
commit 973d55c12b
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B

View File

@ -113,7 +113,7 @@ func (d *dialer) Dial(ctx context.Context, peerId string) (p peer.Peer, err erro
func (d *dialer) handshake(ctx context.Context, addr, peerId string) (conn drpc.Conn, sc sec.SecureConn, err error) {
st := time.Now()
// TODO: move dial timeout to config
tcpConn, err := net.DialTimeout("tcp", addr, time.Second*3)
tcpConn, err := net.DialTimeout("tcp", addr, time.Second*15)
if err != nil {
return nil, nil, fmt.Errorf("dialTimeout error: %v; since start: %v", err, time.Since(st))
}