added max_idle_per_host as an option to the builder (#473)

This commit is contained in:
CJP10
2019-03-19 16:23:32 -04:00
committed by Sean McArthur
parent 3554b0ad26
commit a54bfc1a39
2 changed files with 19 additions and 0 deletions

View File

@@ -288,6 +288,13 @@ impl ClientBuilder {
self
}
/// Sets the maximum idle connection per host allowed in the pool.
///
/// Default is usize::MAX (no limit).
pub fn max_idle_per_host(self, max: usize) -> ClientBuilder {
self.with_inner(move |inner| inner.max_idle_per_host(max))
}
/// Set a timeout for only the connect phase of a `Client`.
///
/// Default is `None`.