about summary refs log tree commit diff
path: root/src/build-remote
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-remote')
-rw-r--r--src/build-remote/build-remote.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index fd710c2b6b71..3908dfac487d 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -233,7 +233,9 @@ int main (int argc, char * * argv)
                 lock = -1;
 
                 try {
-                    sshStore = openStore("ssh://" + bestMachine->hostName + "?ssh-key=" + bestMachine->sshKey);
+                    sshStore = openStore("ssh://" + bestMachine->hostName,
+                        { {"ssh-key", bestMachine->sshKey },
+                          {"max-connections", "1" } });
                     hostName = bestMachine->hostName;
                 } catch (std::exception & e) {
                     printError("unable to open SSH connection to ‘%s’: %s; trying other available machines...",