fix: lock fail on heartbeat

- add response ref on list-menu

Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
Pakin 2026-05-15 16:48:59 +07:00
parent b16fa72383
commit 32033820a9
2 changed files with 3 additions and 2 deletions

View file

@ -105,7 +105,7 @@ pub async fn read(
} }
"heartbeat" => { "heartbeat" => {
let new_updated_time = Instant::now(); let new_updated_time = Instant::now();
let uidd = uid.try_lock().unwrap().clone(); let uidd = uid.lock().await.clone();
*last_seen.lock().await = new_updated_time; *last_seen.lock().await = new_updated_time;
info!("{}: active", uidd.to_string()); info!("{}: active", uidd.to_string());

View file

@ -538,7 +538,8 @@ pub async fn handle_request_list_menu_recipe(
"type": "notify", "type": "notify",
"payload": { "payload": {
"to": uidd, "to": uidd,
"value": result "value": result,
"from": "list-menu"
} }
}))) })))
.await .await