Commit d6bbbc55 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

rpc-connect: classify newer io errorkinds.

In Rust 1.83 and 1.85, io::ErrorKind added a few new variants.
Here we classify them as "Decline" or "Abort" in our connection
point code.
parent 22237bed
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ fn fs_error_action(err: &std::io::Error) -> ClientErrorAction {
    match err.kind() {
        EK::NotFound => A::Decline,
        EK::PermissionDenied => A::Decline,
        EK::ReadOnlyFilesystem => A::Decline,
        _ => A::Abort,
    }
}
@@ -142,8 +143,9 @@ fn net_error_action(err: &std::io::Error) -> ClientErrorAction {
    match err.kind() {
        EK::ConnectionRefused => A::Decline,
        EK::ConnectionReset => A::Decline,
        // TODO MSRV 1.83; revisit once some of `io_error_more` is stabilized.
        // see https://github.com/rust-lang/rust/pull/128316
        EK::HostUnreachable => A::Decline,
        EK::NetworkDown => A::Decline,
        EK::NetworkUnreachable => A::Decline,
        _ => A::Abort,
    }
}