Fix building with socks-proxy feature (#91)

This PR corrects a variable name and type, and ensures we
test the socks-proxy feature as part of the test matrix.
This commit is contained in:
Martin Algesten
2020-06-24 18:36:08 +02:00
committed by GitHub
parent 3cb178ed7c
commit 6bb838f205
2 changed files with 4 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ jobs:
feature: feature:
- charset - charset
- cookies - cookies
- socks-proxy
env: env:
RUST_BACKTRACE: "1" RUST_BACKTRACE: "1"
steps: steps:

View File

@@ -523,8 +523,9 @@ fn connect_socks5(
let (lock, cvar) = &*master_signal; let (lock, cvar) = &*master_signal;
let done = lock.lock().unwrap(); let done = lock.lock().unwrap();
let timeout_connect = time_until_deadline(deadline)?;
let done_result = cvar let done_result = cvar
.wait_timeout(done, time_until_deadline(deadline)?) .wait_timeout(done, timeout_connect)
.unwrap(); .unwrap();
let done = done_result.0; let done = done_result.0;
if *done { if *done {
@@ -534,7 +535,7 @@ fn connect_socks5(
ErrorKind::TimedOut, ErrorKind::TimedOut,
format!( format!(
"SOCKS5 proxy: {}:{} timed out connecting after {}ms.", "SOCKS5 proxy: {}:{} timed out connecting after {}ms.",
host, port, timeout_connect host, port, timeout_connect.as_millis()
), ),
)); ));
} }