From d4d90979efd2d45335c06c093f83bb82e27c645a Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 31 Jul 2018 14:38:29 -0700 Subject: [PATCH] peer: increase peer write timeout to 50 seconds Sometimes when performing an initial sync, the remote node isn't able to pull messages off the wire because of long running tasks and queues are saturated. With a shorter write timeout, we will give up trying to send messages and teardown the connection, even though the peer is still active. --- peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peer.go b/peer.go index 1040674b..6ce9302d 100644 --- a/peer.go +++ b/peer.go @@ -43,7 +43,7 @@ const ( idleTimeout = 5 * time.Minute // writeMessageTimeout is the timeout used when writing a message to peer. - writeMessageTimeout = 10 * time.Second + writeMessageTimeout = 50 * time.Second // outgoingQueueLen is the buffer size of the channel which houses // messages to be sent across the wire, requested by objects outside