diff --git a/node/src/exchange/server.rs b/node/src/exchange/server.rs index f6472a036..8d034f3fe 100644 --- a/node/src/exchange/server.rs +++ b/node/src/exchange/server.rs @@ -104,10 +104,8 @@ where } pub fn poll(&mut self, cx: &mut Context<'_>) -> Poll<(C, ResponseType)> { - while let Poll::Ready(ev) = Pin::new(&mut self.store_jobs).poll_next(cx) { - if let Some(response) = ev { - return Poll::Ready(response); - } + while let Poll::Ready(Some(response)) = Pin::new(&mut self.store_jobs).poll_next(cx) { + return Poll::Ready(response); } Poll::Pending