From 1fd05a157f70c99157079672584d3f1aa1626bd8 Mon Sep 17 00:00:00 2001 From: Wouter Geraedts Date: Wed, 23 Oct 2019 22:34:39 +0200 Subject: [PATCH] Reset delay to prevent poll after ready --- src/stream/stream/throttle.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stream/stream/throttle.rs b/src/stream/stream/throttle.rs index 8e96fea..2a0cc56 100644 --- a/src/stream/stream/throttle.rs +++ b/src/stream/stream/throttle.rs @@ -45,6 +45,8 @@ impl Stream for Throttle { // Sets last to None. *self.as_mut().delay() = Some(Delay::new(self.duration)); return Poll::Ready(Some(v)); + } else { + *self.as_mut().delay() = None; } } }