aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-08-08 12:24:21 -0700
committerSteven Fackler <[email protected]>2015-08-08 12:25:16 -0700
commit69cbd145407288e3b22b7336fe6a679546b4b2fd (patch)
treeb0cdfc7046f757be87e983af9a3b0333aff485eb /openssl/src
parentMerge pull request #243 from manuels/master (diff)
downloadrust-openssl-69cbd145407288e3b22b7336fe6a679546b4b2fd.tar.xz
rust-openssl-69cbd145407288e3b22b7336fe6a679546b4b2fd.zip
Handle WantWrite and WantRead errors
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 6cbd6f88..9781efe5 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1046,6 +1046,14 @@ 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"))
+ }
err => panic!("unexpected error {:?} with ret {}", err, ret),
}
}