Skip to content

Commit

Permalink
rpc-client: Use regular timeout value for pool idle timeout too
Browse files Browse the repository at this point in the history
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: hyperium/hyper#2136.
  • Loading branch information
im-0 authored and mvines committed Sep 16, 2022
1 parent 9159415 commit 798975f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rpc-client/src/http_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ impl HttpSender {
reqwest::Client::builder()
.default_headers(default_headers)
.timeout(timeout)
.pool_idle_timeout(timeout)
.build()
.expect("build rpc client"),
);
Expand Down

0 comments on commit 798975f

Please sign in to comment.