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.
This commit is contained in:
Conner Fromknecht 2019-03-26 16:40:24 -07:00
parent 99150b41d6
commit b78e5f6742
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -45,7 +45,7 @@ const (
idleTimeout = 5 * time.Minute idleTimeout = 5 * time.Minute
// writeMessageTimeout is the timeout used when writing a message to peer. // 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 // readMessageTimeout is the timeout used when reading a message from a
// peer. // peer.