Fix flow control bug (#177)

This patch fixes a bug that prevents sent data from being flushed to the
socket.

When data is sent, the task managing the connection must be notified. A
guard exists that prevents unnecessary notification of the connection
when the stream does not have any send capacity. However, this guard was
buggy. Instead of notifying the connection if *any* data can be sent, it
notified the connection only when *all* data could be sent.

This patch fixes the check as well as adds some tests that ensure the
connection task is notified.
This commit is contained in:
Carl Lerche
2017-11-29 12:54:23 -08:00
committed by GitHub
parent 35e0125e82
commit 5d54d8cd79
5 changed files with 191 additions and 3 deletions

View File

@@ -13,6 +13,9 @@ pub use super::mock::{self, HandleFutureExt};
// Re-export frames helpers
pub use super::frames;
// Re-export mock notify
pub use super::notify::MockNotify;
// Re-export utility mod
pub use super::util;