diff options
| author | Steven Fackler <[email protected]> | 2015-08-10 22:29:34 -0400 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-08-10 22:29:34 -0400 |
| commit | df32e53afad3e62ff845ab9cf8d3d22e1c7c9dcb (patch) | |
| tree | 85d808ce732a43ca7140ad62e30a7dc94e2955e1 /openssl/src/ssl | |
| parent | Handle WantWrite and WantRead errors (diff) | |
| download | rust-openssl-df32e53afad3e62ff845ab9cf8d3d22e1c7c9dcb.tar.xz rust-openssl-df32e53afad3e62ff845ab9cf8d3d22e1c7c9dcb.zip | |
Grab errno for directstream want errors
Diffstat (limited to 'openssl/src/ssl')
| -rw-r--r-- | openssl/src/ssl/mod.rs | 9 |
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), } |