From f64597e5508a6dfcb41448cd73be261b43736763 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Aug 2021 13:54:09 +0100 Subject: [PATCH] client: better logging of ipif failures Signed-off-by: Ian Jackson --- src/bin/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/client.rs b/src/bin/client.rs index 095cd55..b3d7de3 100644 --- a/src/bin/client.rs +++ b/src/bin/client.rs @@ -241,9 +241,9 @@ async fn run_client( data = tx_stream.next_segment(), if tx_queue.is_empty() => { - let data = - data.context("read from ipif")? - .ok_or_else(|| io::Error::from(io::ErrorKind::UnexpectedEof))?; + let data = (||{ + data?.ok_or_else(|| io::Error::from(io::ErrorKind::UnexpectedEof)) + })().context("read from ipif")?; //eprintln!("data={:?}", DumpHex(&data)); match check1(Slip2Mime, ic.mtu, &data, |header| { -- 2.30.2