Skip to content

Commit

Permalink
Added additional logging to find try script issues with provider_loop…
Browse files Browse the repository at this point in the history
… example
  • Loading branch information
tkmcmaster committed Nov 6, 2023
1 parent 49a3d68 commit 0388b69
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/channel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,19 @@ impl<T: Serialize> Stream for Receiver<T> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
debug!(
"Receiver:poll_next channel {}, length: {}",
self.channel.name, self.channel.name
self.channel.name, self.channel.len()
);
loop {
if let Some(listener) = self.listener.as_mut() {
match Pin::new(listener).poll(cx) {
Poll::Ready(()) => self.listener = None,
Poll::Pending => return Poll::Pending,
Poll::Ready(()) => {
debug!("Receiver:poll_next channel {}, listener Poll::Ready, listener = None", self.channel.name);
self.listener = None;
},
Poll::Pending => {
debug!("Receiver:poll_next channel {}, listener Poll::Pending", self.channel.name);
return Poll::Pending;
},
}
}

Expand Down

0 comments on commit 0388b69

Please sign in to comment.