Pass common ssh options in isMasterRunning

This commit is contained in:
David McFarland 2023-06-12 23:45:53 -03:00
parent 5454fdcceb
commit d5e1eb20a2

View file

@ -42,7 +42,10 @@ void SSHMaster::addCommonSSHOpts(Strings & args)
} }
bool SSHMaster::isMasterRunning() { bool SSHMaster::isMasterRunning() {
auto res = runProgram(RunOptions {.program = "ssh", .args = {"-O", "check", host}, .mergeStderrToStdout = true}); Strings args = {"-O", "check", host};
addCommonSSHOpts(args);
auto res = runProgram(RunOptions {.program = "ssh", .args = args, .mergeStderrToStdout = true});
return res.first == 0; return res.first == 0;
} }