fix: AsyncStream should use a zero-capacity stream to ensure we run in lock-step

This commit is contained in:
Ryan Leckey 2020-06-18 18:59:23 -07:00
parent 6cfe5ac811
commit 21717b47a0

View file

@ -21,7 +21,7 @@ impl<'a, T> TryAsyncStream<'a, T> {
Fut: 'a + Future<Output = Result<(), Error>> + Send, Fut: 'a + Future<Output = Result<(), Error>> + Send,
T: 'a + Send, T: 'a + Send,
{ {
let (mut sender, receiver) = mpsc::channel(1); let (mut sender, receiver) = mpsc::channel(0);
let future = f(sender.clone()); let future = f(sender.clone());
let future = async move { let future = async move {