diff --git a/zebrad/src/components/inbound.rs b/zebrad/src/components/inbound.rs index 67fb41d8..7f1f1e56 100644 --- a/zebrad/src/components/inbound.rs +++ b/zebrad/src/components/inbound.rs @@ -122,7 +122,9 @@ impl Service for Inbound { } // Clean up completed download tasks - while let Poll::Ready(Some(_)) = self.downloads.unwrap().poll_next(cx) {} + if let Some(downloads) = self.downloads.as_mut() { + while let Poll::Ready(Some(_)) = Pin::new(downloads).poll_next(cx) {} + } // Now report readiness based on readiness of the inner services, if they're available. // XXX do we want to propagate backpressure from the network here?