X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-background-processor%2Fsrc%2Flib.rs;h=da5f2acf86c6e2d6403ff9c113ef8c802f7e2532;hb=ca367f5d085cdc8e9a3e3bca4a846d840eea7c26;hp=3dd099b495de24085d1548eee3df60a1a9e3c93a;hpb=8676c5aa4e18086bf56a21966de01f173b6b6983;p=rust-lightning diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index 3dd099b4..da5f2acf 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -554,7 +554,10 @@ where |fut: &mut SleepFuture, _| { let mut waker = dummy_waker(); let mut ctx = task::Context::from_waker(&mut waker); - core::pin::Pin::new(fut).poll(&mut ctx).is_ready() + match core::pin::Pin::new(fut).poll(&mut ctx) { + task::Poll::Ready(exit) => { should_break = exit; true }, + task::Poll::Pending => false, + } }, mobile_interruptable_platform) }