diff --git a/src/proto/streams/streams.rs b/src/proto/streams/streams.rs index 132d91bd..7b5c7669 100644 --- a/src/proto/streams/streams.rs +++ b/src/proto/streams/streams.rs @@ -1576,6 +1576,9 @@ impl Actions { // Reset the stream. self.send .send_reset(reason, initiator, buffer, stream, counts, &mut self.task); + self.recv.enqueue_reset_expiration(stream, counts); + // if a RecvStream is parked, ensure it's notified + stream.notify_recv(); Ok(()) } else { tracing::warn!( diff --git a/tests/h2-tests/tests/stream_states.rs b/tests/h2-tests/tests/stream_states.rs index 9a377d79..facd367e 100644 --- a/tests/h2-tests/tests/stream_states.rs +++ b/tests/h2-tests/tests/stream_states.rs @@ -536,7 +536,12 @@ async fn recv_next_stream_id_updated_by_malformed_headers() { client.recv_frame(frames::go_away(1).protocol_error()).await; }; let srv = async move { - let mut srv = server::handshake(io).await.expect("handshake"); + let mut srv = server::Builder::new() + // forget the bad stream immediately + .max_concurrent_reset_streams(0) + .handshake::<_, Bytes>(io) + .await + .expect("handshake"); let res = srv.next().await.unwrap(); let err = res.unwrap_err(); assert_eq!(err.reason(), Some(h2::Reason::PROTOCOL_ERROR));