Clear recv buffer when stream refs are dropped
This commit is contained in:
@@ -410,6 +410,8 @@ impl Recv {
|
||||
task,
|
||||
);
|
||||
stream.in_flight_recv_data = 0;
|
||||
|
||||
self.clear_recv_buffer(stream);
|
||||
}
|
||||
|
||||
/// Set the "target" connection window size.
|
||||
@@ -703,6 +705,12 @@ impl Recv {
|
||||
stream.notify_recv();
|
||||
}
|
||||
|
||||
pub(super) fn clear_recv_buffer(&mut self, stream: &mut Stream) {
|
||||
while let Some(_) = stream.pending_recv.pop_front(&mut self.buffer) {
|
||||
// drop it
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the max ID of streams we can receive.
|
||||
///
|
||||
/// This gets lowered if we send a GOAWAY frame.
|
||||
|
||||
Reference in New Issue
Block a user