Skip to content

Commit

Permalink
transports/quic: return err on read after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
elenaf9 committed Sep 19, 2022
1 parent 4e027b1 commit bdba780
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions transports/quic/src/muxer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,8 @@ impl AsyncRead for Substream {
bytes += chunk.bytes.len();
}
Ok(None) => break,
Err(ReadError::Reset(error_code)) => {
tracing::error!(
"substream {} was reset with error code {}",
self.id,
error_code
);
bytes = 0;
break;
Err(err @ ReadError::Reset(_)) => {
return Poll::Ready(Err(io::Error::new(io::ErrorKind::ConnectionReset, err)))
}
Err(ReadError::Blocked) => {
pending = true;
Expand Down

0 comments on commit bdba780

Please sign in to comment.