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.

(cherry picked from commit 798975f)
  • Loading branch information
im-0 authored and mvines committed Sep 17, 2022
1 parent 6ae6ca4 commit 672f880
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/src/http_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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 672f880

Please sign in to comment.