More send flow control

This commit is contained in:
Carl Lerche
2017-08-09 14:37:41 -07:00
parent a8c8cdb8e9
commit 95bb95af01
4 changed files with 43 additions and 17 deletions

View File

@@ -32,7 +32,7 @@ impl<B> Prioritize<B>
}
pub fn available_window(&self) -> WindowSize {
let win = self.flow_control.window_size();
let win = self.flow_control.effective_window_size();
if self.buffered_data >= win as usize {
0
@@ -109,7 +109,7 @@ impl<B> Prioritize<B>
Frame::Data(frame) => {
let len = frame.payload().remaining();
if len > self.flow_control.window_size() as usize {
if len > self.flow_control.effective_window_size() as usize {
// TODO: This could be smarter...
stream.pending_send.push_front(&mut self.buffer, frame.into());