feat(client): rename client::Builder pool options (#2142)
- Renamed `keep_alive_timeout` to `pool_idle_timeout`. - Renamed `max_idle_per_host` to `pool_max_idle_per_host`. - Deprecated `keep_alive(bool)` due to confusing name. To disable the connection pool, call `pool_max_idle_per_host(0)`.
This commit is contained in:
@@ -1282,13 +1282,9 @@ mod dispatch_impl {
|
||||
let _ = rx2.recv();
|
||||
});
|
||||
|
||||
let client =
|
||||
Client::builder()
|
||||
.keep_alive(false)
|
||||
.build(DebugConnector::with_http_and_closes(
|
||||
HttpConnector::new(),
|
||||
closes_tx,
|
||||
));
|
||||
let client = Client::builder().pool_max_idle_per_host(0).build(
|
||||
DebugConnector::with_http_and_closes(HttpConnector::new(), closes_tx),
|
||||
);
|
||||
|
||||
let req = Request::builder()
|
||||
.uri(&*format!("http://{}/a", addr))
|
||||
|
||||
Reference in New Issue
Block a user