aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-08-10 22:29:34 -0400
committerSteven Fackler <[email protected]>2015-08-10 22:29:34 -0400
commitdf32e53afad3e62ff845ab9cf8d3d22e1c7c9dcb (patch)
tree85d808ce732a43ca7140ad62e30a7dc94e2955e1
parentHandle WantWrite and WantRead errors (diff)
downloadrust-openssl-df32e53afad3e62ff845ab9cf8d3d22e1c7c9dcb.tar.xz
rust-openssl-df32e53afad3e62ff845ab9cf8d3d22e1c7c9dcb.zip
Grab errno for directstream want errors
-rw-r--r--openssl/src/ssl/mod.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 9781efe5..0d7351dc 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1046,13 +1046,8 @@ impl<S> DirectStream<S> {
err
}
}
- LibSslError::ErrorWantWrite => {
- SslError::StreamError(io::Error::new(io::ErrorKind::TimedOut,
- "socket write timed out"))
- }
- LibSslError::ErrorWantRead => {
- SslError::StreamError(io::Error::new(io::ErrorKind::TimedOut,
- "socket read timed out"))
+ LibSslError::ErrorWantWrite | LibSslError::ErrorWantRead => {
+ SslError::StreamError(io::Error::last_os_error())
}
err => panic!("unexpected error {:?} with ret {}", err, ret),
}