}
}.await;
- drop(ipif.tx_stream);
-
- match ipif.child.wait().await {
- Err(e) => error!("{}: also, failed to await ipif child: {}", &ic, e),
- Ok(st) => {
- let stderr_timeout = Duration::from_millis(1000);
- match tokio::time::timeout(stderr_timeout, ipif.stderr_task).await {
- Err::<_,tokio::time::error::Elapsed>(_)
- => warn!("{}: ipif stderr task continues!", &ic),
- Ok(Err(e)) => error!("{}: ipif stderr task crashed: {}", &ic, e),
- Ok(Ok(Err(e))) => error!("{}: ipif stderr read failed: {}", &ic, e),
- Ok(Ok(Ok(()))) => { },
- }
- if ! st.success() {
- error!("{}: ipif process failed: {}", &ic, st);
- }
- }
- }
-
+ ipif.quitting(&ic).await;
trouble
}
child,
}
}
+
+ pub async fn quitting(mut self, ic: &InstanceConfig) {
+ drop(self.tx_stream);
+
+ match self.child.wait().await {
+ Err(e) => error!("{}: also, failed to await ipif child: {}", &ic, e),
+ Ok(st) => {
+ let stderr_timeout = Duration::from_millis(1000);
+ match tokio::time::timeout(stderr_timeout, self.stderr_task).await {
+ Err::<_,tokio::time::error::Elapsed>(_)
+ => warn!("{}: ipif stderr task continues!", &ic),
+ Ok(Err(e)) => error!("{}: ipif stderr task crashed: {}", &ic, e),
+ Ok(Ok(Err(e))) => error!("{}: ipif stderr read failed: {}", &ic, e),
+ Ok(Ok(Ok(()))) => { },
+ }
+ if ! st.success() {
+ error!("{}: ipif process failed: {}", &ic, st);
+ }
+ }
+ }
+ }
}