mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
fix(appd): broadcast LaunchAck to all WebSocket clients on app launch
Previously LaunchAck was sent only as a direct response to the requesting connection. The servo-shell appd_ws listener thread is a separate WebSocket connection and would never receive LaunchAck for UI-initiated launches, causing those sessions to have no WebView. Now dispatch() broadcasts LaunchAck over the registry broadcast channel immediately after returning the direct response, so all connected WebSocket clients (including the shell listener) learn about every new session regardless of which connection triggered the launch.
This commit is contained in:
parent
dde4a1dffb
commit
55b80ea2b3
1 changed files with 4 additions and 0 deletions
|
|
@ -302,6 +302,10 @@ pub(crate) async fn dispatch(req: Request, registry: &Registry) -> Response {
|
||||||
tracing::warn!(session_id, error = %e, "runtime supervisor error");
|
tracing::warn!(session_id, error = %e, "runtime supervisor error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
let _ = registry.lock().await.broadcast().send(Response::LaunchAck {
|
||||||
|
session_id,
|
||||||
|
app_id: app_id.clone(),
|
||||||
|
});
|
||||||
Response::LaunchAck { session_id, app_id }
|
Response::LaunchAck { session_id, app_id }
|
||||||
}
|
}
|
||||||
Request::TerminateApp { session_id } => {
|
Request::TerminateApp { session_id } => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue