ssrlive
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
src/tun2proxy.rs
|
|
|
@ -447,11 +447,11 @@ impl<'a> TunToProxy<'a> { |
|
|
|
|
|
|
|
let mut buf = [0u8; 4096]; |
|
|
|
let read_result = state.mio_stream.read(&mut buf); |
|
|
|
let read = if read_result.is_err() { |
|
|
|
let read = if let Ok(read_result) = read_result { |
|
|
|
read_result |
|
|
|
} else { |
|
|
|
error!("READ from proxy: {}", read_result.as_ref().err().unwrap()); |
|
|
|
0 |
|
|
|
} else { |
|
|
|
read_result.unwrap() |
|
|
|
}; |
|
|
|
|
|
|
|
if read == 0 { |
|
|
|
|