From 0856f37d28b80c83ee9d795912cfddd869e250c8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 5 Aug 2021 01:07:34 +0100 Subject: [PATCH] client: report ipif exit status if it fails Signed-off-by: Ian Jackson --- src/bin/client.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/bin/client.rs b/src/bin/client.rs index 42d3dc0..75e868d 100644 --- a/src/bin/client.rs +++ b/src/bin/client.rs @@ -211,7 +211,7 @@ async fn run_client( let mut rx_queue: FrameQueue = default(); - async { + let trouble = async { loop { let rx_queue_space = if rx_queue.remaining() < ic.max_batch_down.sat() { @@ -310,7 +310,17 @@ async fn run_client( }, } } - }.await + }.await; + + drop(tx_stream); + + match ipif.wait().await { + Err(e) => error!("{}: also, failed to await ipif child: {}", &ic, e), + Ok(st) if st.success() => { }, + Ok(st) => error!("{}: ipif process failed: {}", &ic, st), + } + + trouble } #[tokio::main] -- 2.30.2