wake lock for all connection type

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-11-24 16:40:18 +08:00
parent bd81e4d0fb
commit 2de1c62daf
9 changed files with 102 additions and 87 deletions

View File

@@ -618,10 +618,11 @@ pub mod client {
}
pub extern "C" fn drop_portable_service_shared_memory() {
// https://stackoverflow.com/questions/35980148/why-does-an-atexit-handler-panic-when-it-accesses-stdout
// Please make sure there is no print in the call stack
let mut lock = SHMEM.lock().unwrap();
if lock.is_some() {
*lock = None;
log::info!("drop shared memory");
}
}