We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f327ab commit e488dcaCopy full SHA for e488dca
tokio-boring/src/lib.rs
@@ -254,6 +254,19 @@ where
254
return Poll::Pending;
255
}
256
Err(e) => {
257
+ // If boring returns PROTOCOL_IS_SHUTDOWN then the connection
258
+ // has already been shutdown and we can just return Ok(()), as
259
+ // this was exactly what we wanted to do anyway.
260
+ if e.code() == ErrorCode::SSL {
261
+ if let Some(stack) = e.ssl_error() {
262
+ if let Some(first) = stack.errors.first() {
263
+ if first.code() as i32 == boring_sys::SSL_R_PROTOCOL_IS_SHUTDOWN {
264
+ return Poll::Ready(Ok(()));
265
+ }
266
267
268
269
+
270
return Poll::Ready(Err(e
271
.into_io_error()
272
.unwrap_or_else(|e| io::Error::new(io::ErrorKind::Other, e))));
0 commit comments