fix a crash

This commit is contained in:
Daniella / Tove 2023-01-31 21:25:44 +01:00
parent 50e5d1d318
commit 4a9cbbcfc0
3 changed files with 5 additions and 2 deletions

2
Cargo.lock generated
View file

@ -72,7 +72,7 @@ dependencies = [
[[package]] [[package]]
name = "revpfw3" name = "revpfw3"
version = "0.1.0" version = "0.1.1"
dependencies = [ dependencies = [
"enum-ordinalize", "enum-ordinalize",
] ]

View file

@ -3,7 +3,7 @@ name = "revpfw3"
repository = "https://github.com/tudbut/revpfw3" repository = "https://github.com/tudbut/revpfw3"
description = "A tool to bypass portforwarding restrictions using some cheap VServer" description = "A tool to bypass portforwarding restrictions using some cheap VServer"
license = "MIT" license = "MIT"
version = "0.1.0" version = "0.1.1"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -73,6 +73,9 @@ impl SocketAdapter {
} }
Ok(()) Ok(())
} }
Err(x) if x.kind() == ErrorKind::WouldBlock => {
Ok(())
}
Err(x) => { Err(x) => {
self.broken = Some(x.raw_os_error().unwrap()); self.broken = Some(x.raw_os_error().unwrap());
Err(x) Err(x)