From: Ian Jackson Date: Sun, 8 Aug 2021 00:48:22 +0000 (+0100) Subject: ipif: Drop things in the right order, to avoid child SIPIPE X-Git-Tag: hippotat/1.0.0~236 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=ff8bdc1f85ac8d6a0baaf1e51996fa4c1954ced9;p=hippotat.git ipif: Drop things in the right order, to avoid child SIPIPE Signed-off-by: Ian Jackson --- diff --git a/src/ipif.rs b/src/ipif.rs index a466a79..9b57086 100644 --- a/src/ipif.rs +++ b/src/ipif.rs @@ -48,7 +48,7 @@ impl Ipif { pub async fn quitting(mut self, ic: Option<&InstanceConfig>) { let icd = OptionPrefixColon(ic); - drop(self.tx); + drop(self.rx); match self.child.wait().await { Err(e) => error!("{}also, failed to await ipif child: {}", icd, e), @@ -79,5 +79,7 @@ impl Ipif { } } } + + drop(self.tx); } }