mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +03:00
fix termination of libei emulation on error
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user