From b78e5f67428e31e950b44f1d2332787871165d1d Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 26 Mar 2019 16:40:24 -0700 Subject: [PATCH] peer: reduce write timeout to 5 seconds This commit reduces the peer's write timeout to 5s. Now that the peer catches write timeouts and doesn't disconnect, this will ensure we spend less time blocking in the write pool in case others also need to access the workers concurrently. Slower peers will now only block for 5s, after every reattempt w/ exponential backoff. --- peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peer.go b/peer.go index 84cfe9ea..549e94a3 100644 --- a/peer.go +++ b/peer.go @@ -45,7 +45,7 @@ const ( idleTimeout = 5 * time.Minute // writeMessageTimeout is the timeout used when writing a message to peer. - writeMessageTimeout = 50 * time.Second + writeMessageTimeout = 5 * time.Second // readMessageTimeout is the timeout used when reading a message from a // peer.