diff --git a/src/unit.rs b/src/unit.rs index 10be237..ae538e4 100644 --- a/src/unit.rs +++ b/src/unit.rs @@ -256,7 +256,7 @@ fn connect_inner( let url = &unit.url; let method = &unit.method; - let socket_host = unit.spoofed_host + let socket_host = unit.spoofed_host.as_ref() .map(|r|r.as_ref()) .unwrap_or(host);