fix termination of libei emulation on error

This commit is contained in:
Ferdinand Schober
2024-07-12 02:45:47 +02:00
parent b4afbbec45
commit 621d9eac59

View File

@@ -1,4 +1,4 @@
use futures::StreamExt;
use futures::{future, StreamExt};
use once_cell::sync::Lazy;
use std::{
collections::HashMap,
@@ -265,6 +265,8 @@ async fn ei_task(
Err(e) => {
libei_error.store(true, Ordering::SeqCst);
error.lock().unwrap().replace(e);
// wait for termination -> otherwise we will loop forever
future::pending::<()>().await;
}
}
}