1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +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:
Eelco Dolstra 2017-05-02 14:18:46 +02:00
parent 1a68710d4d
commit cd4d2705ec
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 19 additions and 1 deletions

View file

@ -262,6 +262,11 @@ struct LegacySSHStore : public Store
return readStorePaths<PathSet>(*this, conn->from);
}
void connect() override
{
auto conn(connections->get());
}
};
static RegisterStoreImplementation regStore([](