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:
parent
99150b41d6
commit
b78e5f6742
2
peer.go
2
peer.go
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user