From bde3252eccab9dd336236f5439f17e5b4a5c54cf Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 7 Jul 2023 11:42:31 +0900 Subject: [PATCH] fix(quic/stream): return error on read --- transports/quic/src/connection/stream.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/transports/quic/src/connection/stream.rs b/transports/quic/src/connection/stream.rs index d6c07d90821..b0c505bf856 100644 --- a/transports/quic/src/connection/stream.rs +++ b/transports/quic/src/connection/stream.rs @@ -57,11 +57,7 @@ impl AsyncRead for Stream { return Poll::Ready(Ok(0)); } } - let read_result = futures::ready!(Pin::new(&mut self.recv).poll_read(cx, buf)); - if read_result.is_err() { - return Poll::Ready(Ok(0)); - } - Poll::Ready(read_result) + Pin::new(&mut self.recv).poll_read(cx, buf) } }