From 0388b69416ad34a6b03ee38cb6c159c4ce2ef312 Mon Sep 17 00:00:00 2001 From: Trevor McMaster Date: Mon, 6 Nov 2023 13:57:45 -0700 Subject: [PATCH] Added additional logging to find try script issues with provider_loop example --- lib/channel/src/lib.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/channel/src/lib.rs b/lib/channel/src/lib.rs index 0353b460..4aa1e5de 100644 --- a/lib/channel/src/lib.rs +++ b/lib/channel/src/lib.rs @@ -592,13 +592,19 @@ impl Stream for Receiver { fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { 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; + }, } }