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:
Ivan Mironov 2022-09-17 00:42:44 +05:00 committed by Michael Vines
parent 9159415e1b
commit 798975ffa5
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ impl HttpSender {
reqwest::Client::builder()
.default_headers(default_headers)
.timeout(timeout)
.pool_idle_timeout(timeout)
.build()
.expect("build rpc client"),
);