mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[rtns] Fix crash when ssh error occurs during refresh (#6936)
This commit is contained in:
@@ -235,7 +235,14 @@ static void DisplayGui() {
|
||||
ImGui::Text("Refreshing Status");
|
||||
const auto fs = futureStatus->wait_for(std::chrono::seconds(0));
|
||||
if (fs == std::future_status::ready) {
|
||||
deviceStatuses[i.first] = futureStatus->get();
|
||||
// DeploySession may throw exceptions. They've already been logged, so
|
||||
// we can ignore them.
|
||||
try {
|
||||
deviceStatuses[i.first] = futureStatus->get();
|
||||
} catch (const std::exception&) {
|
||||
// pass, already been logged
|
||||
}
|
||||
// Always destroy the future so the UI updates
|
||||
deploySession.DestroyStatusFuture(i.first);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user