From cd4d2705ec6e641ffa3b11dc1aabad22fc38251a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 2 May 2017 14:18:46 +0200 Subject: 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. --- src/build-remote/build-remote.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/build-remote') diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 5cd3c518b787..8876da6c063c 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -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) { -- cgit 1.4.1