From 22e16f15a69f53934a61978eb18fdf0244a74a99 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 18 Jun 2014 10:39:42 +0200 Subject: [PATCH] Reduce peer timeout to 10 seconds --- peer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/peer.go b/peer.go index 07c93e5b4..5362b0f77 100644 --- a/peer.go +++ b/peer.go @@ -124,6 +124,7 @@ type Peer struct { port uint16 caps Caps + // This peer's public key pubkey []byte // Indicated whether the node is catching up or not @@ -171,7 +172,7 @@ func NewOutboundPeer(addr string, ethereum *Ethereum, caps Caps) *Peer { // Set up the connection in another goroutine so we don't block the main thread go func() { - conn, err := net.DialTimeout("tcp", addr, 30*time.Second) + conn, err := net.DialTimeout("tcp", addr, 10*time.Second) if err != nil { ethutil.Config.Log.Debugln("Connection to peer failed", err)