From eeb8aca541e3d5f270c6ec5983c1289a86377108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 24 Oct 2019 14:23:10 +0200 Subject: [PATCH] fix crash when client connection is aborted --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 383ae63..f62de62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -343,6 +343,9 @@ impl Server { Err(Error::ConnectionClosed) | Err(Error::Timeout) | Err(Error::HttpParse(_)) => { return Ok(()) } + Err(Error::Io(ref io_error)) if io_error.kind() == std::io::ErrorKind::BrokenPipe => { + return Ok(()) + } Err(Error::RequestTooLarge) => { let resp = Response::builder()