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 {
345345
346346 fn client_generic ( ) -> ClientBuilder {
347347 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 )
348352 . gzip ( false )
349353 . proxy ( Proxy :: custom ( env_proxy) )
350354 . timeout ( Duration :: from_secs ( 30 ) )
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ async fn socks_proxy_request() {
6161 let url = Url :: parse ( "http://192.168.0.1/" ) . unwrap ( ) ;
6262
6363 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 )
6468 . proxy ( Proxy :: custom ( env_proxy) )
6569 . timeout ( Duration :: from_secs ( 1 ) )
6670 . build ( )
You can’t perform that action at this time.
0 commit comments