diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-05-02T12·18+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-05-02T13·46+0200 |
commit | cd4d2705ec6e641ffa3b11dc1aabad22fc38251a (patch) | |
tree | 78ea8c0f0f64877588af1c0ee1fe94139e5ecfbd /src/build-remote | |
parent | 1a68710d4dff609bbaf61db3e17a2573f0aadf17 (diff) |
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.
Diffstat (limited to 'src/build-remote')
-rw-r--r-- | src/build-remote/build-remote.cc | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |