mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Increase IO_TIMEOUT to allow nodes on high-latency connections to sync (#3109)
Commit d3dbafa80b
"Use blocking IO in P2P to reduce CPU load" (merged
into v2.1.0) introduced the constant IO_TIMEOUT, setting it to 1 second.
On nodes with high-latency connections, this short timeout causes the
txhashset archive download during step 2 of the IBD process to
invariably fail before it completes. Since there's no mechanism for
resuming a failed download, this means the node gets stuck at this stage
and never syncs.
Increasing IO_TIMEOUT to 10 seconds solves the issue on my node; others
might suggest a more optimal value for the constant.
This commit is contained in:
parent
76ac9419b8
commit
928097ad62
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ use std::{
|
|||
thread::{self, JoinHandle},
|
||||
};
|
||||
|
||||
const IO_TIMEOUT: Duration = Duration::from_millis(1000);
|
||||
const IO_TIMEOUT: Duration = Duration::from_millis(10000);
|
||||
|
||||
/// A trait to be implemented in order to receive messages from the
|
||||
/// connection. Allows providing an optional response.
|
||||
|
|
Loading…
Reference in a new issue