Skip to content

Commit

Permalink
Merge remote-tracking branch 'goto-bus-stop/fix/broken-pipe' into HEAD
Browse files Browse the repository at this point in the history
close steveklabnik#119

fix crash when client connection is aborted
  • Loading branch information
Sergey Chernomorets committed Dec 16, 2019
2 parents 8211c87 + eeb8aca commit 9b809d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9b809d4

Please sign in to comment.