Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sgl-router/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ impl Router {
}
_ => {
// Wait until all workers are healthy for regular modes
Self::wait_for_healthy_workers(&worker_urls, timeout_secs, interval_secs)?;
let worker_urls = worker_urls.clone();
std::thread::spawn(move || {
// If the function returns Result<_, String> keep it, otherwise adjust
Self::wait_for_healthy_workers(&worker_urls, timeout_secs, interval_secs)
})
.join()
.map_err(|e| format!("Health-check thread panicked: {e:?}"))??;
}
}

Expand Down