Reset last_error before processing resp

This commit is contained in:
Spxg
2025-05-18 16:17:19 +08:00
parent fb77d72913
commit e1ba84c04b

View File

@@ -251,6 +251,8 @@ pub async fn setup_worker() -> (WorkerHandle, UnboundedReceiver<WorkerResponse>)
pub async fn handle_state(state: Store<GlobalState>, mut rx: UnboundedReceiver<WorkerResponse>) {
while let Some(resp) = rx.recv().await {
state.last_error().set(None);
match resp {
WorkerResponse::Ready => unreachable!(),
WorkerResponse::Open(result) => match result {