From 2ade1424f49cdb048e09fdb6cae804b5780c74a0 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 11 Sep 2019 23:07:07 +0300 Subject: [PATCH] Don't bypass stream fuse in 0.1 Forward The poll implementation for Forward used method stream_mut to get at the stream. This bypasses the Fuse that was meant to prevent stream from being polled more than once in case close() on the sink initially returns NotReady. --- src/stream/forward.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream/forward.rs b/src/stream/forward.rs index 1d8b731828..6722af8c20 100644 --- a/src/stream/forward.rs +++ b/src/stream/forward.rs @@ -91,7 +91,7 @@ impl Future for Forward } loop { - match self.stream_mut() + match self.stream.as_mut() .expect("Attempted to poll Forward after completion") .poll()? {