Fix delay construction from non-lazy Handles (#1720)

Closes #1719.
This commit is contained in:
Steven Fackler 2019-11-01 15:32:57 -04:00 committed by Carl Lerche
parent 20993341bd
commit 742d89b0f3

View File

@ -128,7 +128,7 @@ impl Handle {
fn delay_timeout(&self, deadline: Instant, duration: Duration) -> Delay {
match self.inner {
Some(ref handle_priv) => {
Delay::new_with_handle(deadline, Duration::from_secs(0), handle_priv.clone())
Delay::new_with_handle(deadline, duration, handle_priv.clone())
}
None => Delay::new_timeout(deadline, duration),
}