Remove proxy method on request (#220)

This commit is contained in:
Jacob Hoffman-Andrews
2020-11-12 23:25:05 -08:00
committed by GitHub
parent d6f31ebb52
commit 920eccf37a
3 changed files with 2 additions and 11 deletions

View File

@@ -338,7 +338,7 @@ pub(crate) fn connect_host(unit: &Unit, hostname: &str, port: u16) -> Result<Tcp
} else {
unit.deadline
};
let proxy: Option<Proxy> = unit.req.proxy();
let proxy: Option<Proxy> = unit.req.agent.config.proxy.clone();
let netloc = match proxy {
Some(ref proxy) => format!("{}:{}", proxy.server, proxy.port),
None => format!("{}:{}", hostname, port),