#824: a request carries main's request gate (state), not the old cancelled flag

This commit is contained in:
bflatastic
2026-10-26 23:06:38 +07:00
parent b9fc8f5113
commit b87cc3ab47
+1 -1
View File
@@ -95,7 +95,7 @@ fn request(method: &str, params: Value) -> js_sys::Promise {
n.set(n.get() + 1);
n.get()
});
let req = ControlRequest { id: json!(id), method: method.clone(), params: params.clone(), reply, cancelled: Default::default() };
let req = ControlRequest { id: json!(id), method: method.clone(), params: params.clone(), reply, state: Default::default() };
QUEUE.with(|q| q.borrow_mut().push(req));
WAITING.with(|w| w.borrow_mut().push((rx, resolve, reject)));
});