Skip to content

Commit

Permalink
Use Other for ReadError::ClosedStream
Browse files Browse the repository at this point in the history
`NotFound` is nog applicable for `ReadError::ClosedStream` as it is
not a stream that is not found, but a stream that is closed.
  • Loading branch information
msk committed May 17, 2024
1 parent 3e756b7 commit e585df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn from_read_error_to_io_error(e: quinn::ReadError) -> io::Error {
match e {
ReadError::Reset(_) => io::Error::from(io::ErrorKind::ConnectionReset),
ReadError::ConnectionLost(e) => from_connection_error_to_io_error(e),
ReadError::ClosedStream => io::Error::new(io::ErrorKind::NotFound, "unknown stream"),
ReadError::ClosedStream => io::Error::new(io::ErrorKind::Other, "closed stream"),
ReadError::IllegalOrderedRead => {
io::Error::new(io::ErrorKind::InvalidInput, "illegal ordered read")
}
Expand Down

0 comments on commit e585df2

Please sign in to comment.