diff options
author | Wez Furlong <wez@wezfurlong.org> | 2019-12-08 09:31:13 -0800 |
---|---|---|
committer | Wez Furlong <wez@wezfurlong.org> | 2019-12-08 09:31:13 -0800 |
commit | 6fcedf3611af6c3178e78c4f5f7b5dc80aa4482d (patch) | |
tree | 880918c0fd9fde621d26ec08d7622e1f1e111c60 /src | |
parent | ae552d3c5d9884caeac2ba2febb052dc3a58f194 (diff) | |
download | ssh2-rs-6fcedf3611af6c3178e78c4f5f7b5dc80aa4482d.zip |
map TIMEOUT -> std::io::ErrorKind::TimedOut
Closes: https://github.com/alexcrichton/ssh2-rs/issues/141
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<Error> 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) |