File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -836,12 +836,16 @@ mod streaming_trace {
836836}
837837
838838/// Send a JSON-RPC POST and return the raw response (not deserialized).
839+ /// Uses a fixed 120-second per-read timeout (via `.timeout()`) instead of
840+ /// the user-configured `web3_timeout`, so that arbitrarily large streaming
841+ /// responses can be consumed while still detecting server stalls promptly.
839842fn send_blocking_web3_post_raw (
840843 config : & DVFConfig ,
841844 request_body : & serde_json:: Value ,
842845) -> Result < reqwest:: blocking:: Response , ValidationError > {
843846 let client = Client :: builder ( )
844- . timeout ( Duration :: from_millis ( config. web3_timeout ) )
847+ . connect_timeout ( Duration :: from_millis ( config. web3_timeout ) )
848+ . timeout ( Duration :: from_secs ( 120 ) )
845849 . build ( )
846850 . unwrap ( ) ;
847851
You can’t perform that action at this time.
0 commit comments