mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-08-24 22:30:25 -04:00
one more socket error edge case
This commit is contained in:
parent
e4ce42ec08
commit
b091c78539
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ impl<T> IoNetworkResultExt<T> for io::Result<T> {
|
||||||
Err(e) => match e.kind() {
|
Err(e) => match e.kind() {
|
||||||
io::ErrorKind::TimedOut => Ok(NetworkResult::Timeout),
|
io::ErrorKind::TimedOut => Ok(NetworkResult::Timeout),
|
||||||
io::ErrorKind::UnexpectedEof
|
io::ErrorKind::UnexpectedEof
|
||||||
|
| io::ErrorKind::BrokenPipe
|
||||||
| io::ErrorKind::ConnectionAborted
|
| io::ErrorKind::ConnectionAborted
|
||||||
| io::ErrorKind::ConnectionRefused
|
| io::ErrorKind::ConnectionRefused
|
||||||
| io::ErrorKind::ConnectionReset
|
| io::ErrorKind::ConnectionReset
|
||||||
|
@ -51,6 +52,7 @@ impl<T> IoNetworkResultExt<T> for io::Result<T> {
|
||||||
match e.kind() {
|
match e.kind() {
|
||||||
io::ErrorKind::TimedOut => Ok(NetworkResult::Timeout),
|
io::ErrorKind::TimedOut => Ok(NetworkResult::Timeout),
|
||||||
io::ErrorKind::UnexpectedEof
|
io::ErrorKind::UnexpectedEof
|
||||||
|
| io::ErrorKind::BrokenPipe
|
||||||
| io::ErrorKind::ConnectionAborted
|
| io::ErrorKind::ConnectionAborted
|
||||||
| io::ErrorKind::ConnectionRefused
|
| io::ErrorKind::ConnectionRefused
|
||||||
| io::ErrorKind::ConnectionReset => Ok(NetworkResult::NoConnection(e)),
|
| io::ErrorKind::ConnectionReset => Ok(NetworkResult::NoConnection(e)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue