File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,10 @@ pub mod reqwest_be {
345
345
346
346
fn client_generic ( ) -> ClientBuilder {
347
347
Client :: builder ( )
348
+ // HACK: set `pool_max_idle_per_host` to `0` to avoid an issue in the underlying
349
+ // `hyper` library that causes the `reqwest` client to hang in some cases.
350
+ // See <https://github.com/hyperium/hyper/issues/2312> for more details.
351
+ . pool_max_idle_per_host ( 0 )
348
352
. gzip ( false )
349
353
. proxy ( Proxy :: custom ( env_proxy) )
350
354
. timeout ( Duration :: from_secs ( 30 ) )
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ async fn socks_proxy_request() {
61
61
let url = Url :: parse ( "http://192.168.0.1/" ) . unwrap ( ) ;
62
62
63
63
let client = Client :: builder ( )
64
+ // HACK: set `pool_max_idle_per_host` to `0` to avoid an issue in the underlying
65
+ // `hyper` library that causes the `reqwest` client to hang in some cases.
66
+ // See <https://github.com/hyperium/hyper/issues/2312> for more details.
67
+ . pool_max_idle_per_host ( 0 )
64
68
. proxy ( Proxy :: custom ( env_proxy) )
65
69
. timeout ( Duration :: from_secs ( 1 ) )
66
70
. build ( )
You can’t perform that action at this time.
0 commit comments