mirror of
https://github.com/NixOS/nix
synced 2025-07-02 13:31:48 +02:00
build-remote: Fix fallback to other machines when connecting fails
Opening an SSHStore or LegacySSHStore does not actually establish a connection, so the try/catch block here did nothing. Added a Store::connect() method to test whether a connection can be established.
This commit is contained in:
parent
1a68710d4d
commit
cd4d2705ec
5 changed files with 19 additions and 1 deletions
|
@ -167,6 +167,7 @@ int main (int argc, char * * argv)
|
|||
storeParams["ssh-key"] = bestMachine->sshKey;
|
||||
|
||||
sshStore = openStore(bestMachine->storeUri, storeParams);
|
||||
sshStore->connect();
|
||||
storeUri = bestMachine->storeUri;
|
||||
|
||||
} catch (std::exception & e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue