From: Ian Jackson Date: Thu, 5 Aug 2021 00:07:34 +0000 (+0100) Subject: client: report ipif exit status if it fails X-Git-Tag: hippotat/1.0.0~323 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=0856f37d28b80c83ee9d795912cfddd869e250c8;p=hippotat.git client: report ipif exit status if it fails Signed-off-by: Ian Jackson --- 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]