aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/legacy-ssh-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-02 14:18:46 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-02 15:46:09 +0200
commitcd4d2705ec6e641ffa3b11dc1aabad22fc38251a (patch)
tree78ea8c0f0f64877588af1c0ee1fe94139e5ecfbd /src/libstore/legacy-ssh-store.cc
parent1a68710d4dff609bbaf61db3e17a2573f0aadf17 (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/libstore/legacy-ssh-store.cc')
-rw-r--r--src/libstore/legacy-ssh-store.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc
index a6479a450..e09932e3d 100644
--- a/src/libstore/legacy-ssh-store.cc
+++ b/src/libstore/legacy-ssh-store.cc
@@ -262,6 +262,11 @@ struct LegacySSHStore : public Store
return readStorePaths<PathSet>(*this, conn->from);
}
+
+ void connect() override
+ {
+ auto conn(connections->get());
+ }
};
static RegisterStoreImplementation regStore([](