Implement option to set num of DNS threads in async ClientBuilder

This commit is contained in:
Ömer Sinan Ağacan
2017-10-08 12:30:14 +03:00
parent 01e0a144e9
commit d9d92b7479
2 changed files with 14 additions and 9 deletions

View File

@@ -22,8 +22,8 @@ pub struct Connector {
}
impl Connector {
pub fn new(tls: TlsConnector, proxies: Arc<Vec<Proxy>>, handle: &Handle) -> Connector {
let mut http = HttpConnector::new(4, handle);
pub fn new(threads: usize, tls: TlsConnector, proxies: Arc<Vec<Proxy>>, handle: &Handle) -> Connector {
let mut http = HttpConnector::new(threads, handle);
http.enforce_http(false);
let https = HttpsConnector::from((http, tls.clone()));