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:
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -11,6 +11,7 @@ jobs:
|
||||
feature:
|
||||
- charset
|
||||
- cookies
|
||||
- socks-proxy
|
||||
env:
|
||||
RUST_BACKTRACE: "1"
|
||||
steps:
|
||||
|
||||
@@ -523,8 +523,9 @@ fn connect_socks5(
|
||||
let (lock, cvar) = &*master_signal;
|
||||
let done = lock.lock().unwrap();
|
||||
|
||||
let timeout_connect = time_until_deadline(deadline)?;
|
||||
let done_result = cvar
|
||||
.wait_timeout(done, time_until_deadline(deadline)?)
|
||||
.wait_timeout(done, timeout_connect)
|
||||
.unwrap();
|
||||
let done = done_result.0;
|
||||
if *done {
|
||||
@@ -534,7 +535,7 @@ fn connect_socks5(
|
||||
ErrorKind::TimedOut,
|
||||
format!(
|
||||
"SOCKS5 proxy: {}:{} timed out connecting after {}ms.",
|
||||
host, port, timeout_connect
|
||||
host, port, timeout_connect.as_millis()
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user