From 6fcedf3611af6c3178e78c4f5f7b5dc80aa4482d Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 8 Dec 2019 09:31:13 -0800 Subject: map TIMEOUT -> std::io::ErrorKind::TimedOut Closes: https://github.com/alexcrichton/ssh2-rs/issues/141 --- src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/error.rs b/src/error.rs index c5b7543..2499150 100644 --- a/src/error.rs +++ b/src/error.rs @@ -169,6 +169,7 @@ impl From for io::Error { fn from(err: Error) -> io::Error { let kind = match err.code { raw::LIBSSH2_ERROR_EAGAIN => io::ErrorKind::WouldBlock, + raw::LIBSSH2_ERROR_TIMEOUT => io::ErrorKind::TimedOut, _ => io::ErrorKind::Other, }; io::Error::new(kind, err.msg) -- cgit v1.2.3