This commit is contained in:
James Wilson
2024-01-17 17:30:59 +00:00
parent 0154f8a902
commit 36bd933b00
@@ -46,13 +46,13 @@ impl<Hash: BlockHash> Stream for FollowStreamDriver<Hash> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
match self.inner.poll_next_unpin(cx) {
Poll::Pending => return Poll::Pending,
Poll::Pending => Poll::Pending,
Poll::Ready(None) => {
// Mark ourselves as done so that everything can end.
self.shared.done();
return Poll::Ready(None);
Poll::Ready(None)
}
Poll::Ready(Some(Err(e))) => return Poll::Ready(Some(Err(e))),
Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))),
Poll::Ready(Some(Ok(item))) => {
// Push item to any subscribers.
self.shared.push_item(item);