aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent/agent.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-03-21 20:07:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-03-21 20:07:52 +0300
commit16b9c4aa7eec49606d69cf99df18d1fc51468e8f (patch)
tree6df1778373fcb5823948a1ad3b8d386a5e062c5f /bbot/agent/agent.cxx
parent8ac8605c903e769d373a87d3acf167acc9a08a56 (diff)
Minor agent fixesaux-machina
Diffstat (limited to 'bbot/agent/agent.cxx')
-rw-r--r--bbot/agent/agent.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index 8316d1c..5278eba 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -260,8 +260,11 @@ bootstrap_build_machine (const dir_path& md,
make_exception_guard (
[&m, &md] ()
{
- info << "trying to force machine " << md << " down";
- try {m->forcedown (false);} catch (const failed&) {}
+ if (m != nullptr)
+ {
+ info << "trying to force machine " << md << " down";
+ try {m->forcedown (false);} catch (const failed&) {}
+ }
}));
// What happens if the bootstrap process hangs? The simple thing would
@@ -528,8 +531,11 @@ bootstrap_auxiliary_machine (const dir_path& md,
make_exception_guard (
[&m, &md] ()
{
- info << "trying to force machine " << md << " down";
- try {m->forcedown (false);} catch (const failed&) {}
+ if (m != nullptr)
+ {
+ info << "trying to force machine " << md << " down";
+ try {m->forcedown (false);} catch (const failed&) {}
+ }
}));
auto soft_fail = [&md, &m] (const char* msg)
@@ -1420,7 +1426,7 @@ try
// See if there is a pending bootstrap and whether we can perform it.
//
- // What should we do if we can't (i.e., we are in the priority minitor
+ // What should we do if we can't (i.e., we are in the priority monitor
// mode)? Well, we could have found some machines that are already
// bootstrapped (busy or not) and there may be a higher-priority task for
// one of them, so it feels natural to return whatever we've got.
@@ -1925,7 +1931,7 @@ stop_auxiliary_machines (auxiliary_machine_results& amrs)
}
}
}
-};
+}
// Start all the auxiliary machines and patch in their combined environment
// into tm.auxiliary_environment.