Skip to content

Commit

Permalink
less polling
Browse files Browse the repository at this point in the history
  • Loading branch information
fl0rek committed Sep 21, 2023
1 parent 600c52d commit 3d66700
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions node/src/exchange/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
if let Poll::Ready(Some(response)) = Pin::new(&mut self.store_jobs).poll_next(cx) {
return Poll::Ready(response);
}

Poll::Pending
Expand Down

0 comments on commit 3d66700

Please sign in to comment.