Handle WantWrite and WantRead errors

This commit is contained in:
Steven Fackler 2015-08-08 12:24:21 -07:00
parent a10604e15d
commit 69cbd14540
1 changed files with 8 additions and 0 deletions

View File

@ -1046,6 +1046,14 @@ impl<S> DirectStream<S> {
err 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), err => panic!("unexpected error {:?} with ret {}", err, ret),
} }
} }