Skip to content

Commit 0388b69

Browse files
committed
Added additional logging to find try script issues with provider_loop example
1 parent 49a3d68 commit 0388b69

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/channel/src/lib.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -592,13 +592,19 @@ impl<T: Serialize> Stream for Receiver<T> {
592592
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
593593
debug!(
594594
"Receiver:poll_next channel {}, length: {}",
595-
self.channel.name, self.channel.name
595+
self.channel.name, self.channel.len()
596596
);
597597
loop {
598598
if let Some(listener) = self.listener.as_mut() {
599599
match Pin::new(listener).poll(cx) {
600-
Poll::Ready(()) => self.listener = None,
601-
Poll::Pending => return Poll::Pending,
600+
Poll::Ready(()) => {
601+
debug!("Receiver:poll_next channel {}, listener Poll::Ready, listener = None", self.channel.name);
602+
self.listener = None;
603+
},
604+
Poll::Pending => {
605+
debug!("Receiver:poll_next channel {}, listener Poll::Pending", self.channel.name);
606+
return Poll::Pending;
607+
},
602608
}
603609
}
604610

0 commit comments

Comments
 (0)