diff options
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r-- | src/build-remote/build-remote.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 419e7205372b..6e05e165545d 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -176,9 +176,13 @@ int main (int argc, char * * argv) Activity act(*logger, lvlTalkative, actUnknown, fmt("connecting to '%s'", bestMachine->storeUri)); - Store::Params storeParams{{"max-connections", "1"}, {"log-fd", "4"}}; - if (bestMachine->sshKey != "") - storeParams["ssh-key"] = bestMachine->sshKey; + Store::Params storeParams; + if (hasPrefix(storeUri, "ssh://")) { + storeParams["max-connections"] ="1"; + storeParams["log-fd"] = "4"; + if (bestMachine->sshKey != "") + storeParams["ssh-key"] = bestMachine->sshKey; + } sshStore = openStore(bestMachine->storeUri, storeParams); sshStore->connect(); |