Limit send flow control bug to window_size (#78)

Senders could set the available capacity greater than the current
`window_size`.  This caused a panic when the sender attempted
to send more than the receiver could accept.
This commit is contained in:
Carl Lerche
2017-09-12 10:48:11 -07:00
committed by Oliver Gould
parent 9448a19408
commit 93925e6d1f
8 changed files with 192 additions and 44 deletions

View File

@@ -249,6 +249,7 @@ impl<T> Stream for FramedRead<T>
trace!("poll; bytes={}B", bytes.len());
if let Some(frame) = try!(self.decode_frame(bytes)) {
debug!("received; frame={:?}", frame);
return Ok(Async::Ready(Some(frame)));
}
}