diff --git a/src/proto/streams/flow_control.rs b/src/proto/streams/flow_control.rs index 1f43780..f51566c 100644 --- a/src/proto/streams/flow_control.rs +++ b/src/proto/streams/flow_control.rs @@ -63,12 +63,14 @@ impl FlowControl { // TODO: Handle invalid increment if sz <= self.underflow { self.underflow -= sz; - return; + return Ok(()); } let added = sz - self.underflow; self.next_window_update += added; self.underflow = 0; + + Ok(()) } /* diff --git a/src/proto/streams/prioritize.rs b/src/proto/streams/prioritize.rs index 2977023..38d46ee 100644 --- a/src/proto/streams/prioritize.rs +++ b/src/proto/streams/prioritize.rs @@ -48,7 +48,7 @@ impl Prioritize self.flow_control.expand_window(frame.size_increment())?; // Imediately apply the update - self.flow.apply_window_update(); + self.flow_control.apply_window_update(); Ok(()) } diff --git a/src/proto/streams/send.rs b/src/proto/streams/send.rs index a7b15e4..39bd9fc 100644 --- a/src/proto/streams/send.rs +++ b/src/proto/streams/send.rs @@ -184,7 +184,7 @@ impl Send where B: Buf { pub fn recv_connection_window_update(&mut self, frame: frame::WindowUpdate) -> Result<(), ConnectionError> { - self.priority.recv_window_update(frame)?; + self.prioritize.recv_window_update(frame)?; // TODO: If there is available connection capacity, release pending // streams.