rpc-client: Use regular timeout value for pool idle timeout too
Setting pool idle timeout to a value smaller than solana-watchtower's poll interval can fix following error: [2022-08-25T04:03:22.811160892Z INFO solana_watchtower] Failure 1 of 3: solana-watchtower testnet: Error: rpc-error: error sending request for url (https://api.testnet.solana.com/): connection closed before message completed It looks like this happens because either RPC servers or ISPs drop HTTP connections without properly notifying the client in some cases. Similar issue: https://github.com/hyperium/hyper/issues/2136.
This commit is contained in:
parent
9159415e1b
commit
798975ffa5
|
@ -60,6 +60,7 @@ impl HttpSender {
|
||||||
reqwest::Client::builder()
|
reqwest::Client::builder()
|
||||||
.default_headers(default_headers)
|
.default_headers(default_headers)
|
||||||
.timeout(timeout)
|
.timeout(timeout)
|
||||||
|
.pool_idle_timeout(timeout)
|
||||||
.build()
|
.build()
|
||||||
.expect("build rpc client"),
|
.expect("build rpc client"),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue