Print unexpected error codes
This is breaking occaisionally but I can't repro it locally :(
This commit is contained in:
parent
1392970360
commit
217dad59df
|
|
@ -384,7 +384,7 @@ impl Ssl {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(FromPrimitive)]
|
#[deriving(FromPrimitive, Show)]
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
enum LibSslError {
|
enum LibSslError {
|
||||||
ErrorNone = ffi::SSL_ERROR_NONE,
|
ErrorNone = ffi::SSL_ERROR_NONE,
|
||||||
|
|
@ -489,7 +489,7 @@ impl<S: Stream> SslStream<S> {
|
||||||
LibSslError::ErrorWantWrite => { try_ssl_stream!(self.flush()) }
|
LibSslError::ErrorWantWrite => { try_ssl_stream!(self.flush()) }
|
||||||
LibSslError::ErrorZeroReturn => return Err(SslSessionClosed),
|
LibSslError::ErrorZeroReturn => return Err(SslSessionClosed),
|
||||||
LibSslError::ErrorSsl => return Err(SslError::get()),
|
LibSslError::ErrorSsl => return Err(SslError::get()),
|
||||||
_ => unreachable!()
|
err => panic!("unexpected error {}", err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue