Skip to content

Commit 94a7c34

Browse files
committed
Allow setting ssh:// pipe size
Exposed for Hydra. We could make it fancier but with (a) new store settings (b) switch to `ssh-ng://` both in the works, it doesn't seem worth it.
1 parent 0d25cc6 commit 94a7c34

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/libstore/legacy-ssh-store.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ ref<LegacySSHStore::Connection> LegacySSHStore::openConnection()
7070
command.push_back(remoteStore.get());
7171
}
7272
conn->sshConn = master.startCommand(std::move(command), std::list{extraSshArgs});
73+
if (connPipeSize) {
74+
conn->sshConn->trySetBufferSize(*connPipeSize);
75+
}
7376
conn->to = FdSink(conn->sshConn->in.get());
7477
conn->from = FdSource(conn->sshConn->out.get());
7578

src/libstore/legacy-ssh-store.hh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ struct LegacySSHStoreConfig : virtual CommonSSHStoreConfig
3030
*/
3131
Strings extraSshArgs = {};
3232

33+
/**
34+
* Exposed for hydra
35+
*/
36+
std::optional<size_t> connPipeSize;
37+
3338
const std::string name() override { return "SSH Store"; }
3439

3540
static std::set<std::string> uriSchemes() { return {"ssh"}; }

0 commit comments

Comments
 (0)