mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-19 22:43:20 +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 once_cell::sync::Lazy;
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
@@ -265,6 +265,8 @@ async fn ei_task(
|
|||||||
Err(e) => {
|
Err(e) => {
|
||||||
libei_error.store(true, Ordering::SeqCst);
|
libei_error.store(true, Ordering::SeqCst);
|
||||||
error.lock().unwrap().replace(e);
|
error.lock().unwrap().replace(e);
|
||||||
|
// wait for termination -> otherwise we will loop forever
|
||||||
|
future::pending::<()>().await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user