Fix bug in prioritization

This commit is contained in:
Carl Lerche
2017-08-11 19:01:54 -07:00
parent 8a15663ed2
commit 3b2ad536d9

View File

@@ -228,6 +228,7 @@ impl<B> Prioritize<B>
{ {
// First check if there are any data chunks to take back // First check if there are any data chunks to take back
if let Some(frame) = dst.take_last_data_frame() { if let Some(frame) = dst.take_last_data_frame() {
if frame.payload().has_remaining() {
let mut stream = store.resolve(frame.payload().stream); let mut stream = store.resolve(frame.payload().stream);
let frame = frame.map(|prioritized| { let frame = frame.map(|prioritized| {
@@ -237,11 +238,12 @@ impl<B> Prioritize<B>
self.push_back_frame(frame.into(), &mut stream); self.push_back_frame(frame.into(), &mut stream);
true return true;
} else {
false
} }
} }
false
}
} }
/// Push the stream onto the `pending_send` list. Returns true if the sender was /// Push the stream onto the `pending_send` list. Returns true if the sender was