Fix some flow control bugs. (#152)

* Release stream capacity back to the connection to avoid capacity
leaks.
* Actually notify waiting tasks when capacity becomes available.
This commit is contained in:
Carl Lerche
2017-10-13 14:15:20 -07:00
committed by GitHub
parent 5c1bde7d62
commit 7c287af0d0
6 changed files with 196 additions and 9 deletions

View File

@@ -35,8 +35,6 @@ impl Future for WaitForCapacity {
let act = self.stream().capacity();
println!("CAP={:?}", act);
if act >= self.target {
return Ok(self.stream.take().unwrap().into());
}