fix(desktop): kill zombie server process on startup timeout (#11602)
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
This commit is contained in:
parent
4850ecc419
commit
76745d0594
1 changed files with 1 additions and 0 deletions
|
|
@ -526,6 +526,7 @@ async fn spawn_local_server(
|
||||||
let timestamp = Instant::now();
|
let timestamp = Instant::now();
|
||||||
loop {
|
loop {
|
||||||
if timestamp.elapsed() > Duration::from_secs(30) {
|
if timestamp.elapsed() > Duration::from_secs(30) {
|
||||||
|
let _ = child.kill();
|
||||||
break Err(format!(
|
break Err(format!(
|
||||||
"Failed to spawn OpenCode Server. Logs:\n{}",
|
"Failed to spawn OpenCode Server. Logs:\n{}",
|
||||||
get_logs(app.clone()).await.unwrap()
|
get_logs(app.clone()).await.unwrap()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue