summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2019-12-08 09:31:13 -0800
committerWez Furlong <wez@wezfurlong.org>2019-12-08 09:31:13 -0800
commit6fcedf3611af6c3178e78c4f5f7b5dc80aa4482d (patch)
tree880918c0fd9fde621d26ec08d7622e1f1e111c60 /src
parentae552d3c5d9884caeac2ba2febb052dc3a58f194 (diff)
downloadssh2-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.rs1
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)