forked from 1b-agent/opencadstudio-upstream
feat(plugin): harden V4 host integration
Preserve legacy wire indices and route concurrent V4 responses and background requests by correlation and stable tab ID.
This commit is contained in:
commit
f247d15f6e
110 files changed
+32159
-1254
No files matched your search
@@ -89,16 +89,14 @@ fn run_v4(
|
||||
}));
|
||||
}
|
||||
|
||||
match client.recv_runner_frame() {
|
||||
match client.recv_runner_frame_timeout(std::time::Duration::from_millis(50)) {
|
||||
Ok(RunnerFrame::Request { id, payload }) => {
|
||||
if let Some(resp) = handle_host_request_v4(&mut *plugin, interactive, &client, id, payload) {
|
||||
client.send_response(id, resp)?;
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
// Host disconnected.
|
||||
break;
|
||||
}
|
||||
Err(std::sync::mpsc::RecvTimeoutError::Timeout) => continue,
|
||||
Err(std::sync::mpsc::RecvTimeoutError::Disconnected) => break,
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user