Commit 69cbd145 authored by Steven Fackler's avatar Steven Fackler
Browse files

Handle WantWrite and WantRead errors

parent a10604e1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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),
        }
    }