1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

Factor out commonality between WorkerProto::Basic{Client,Server}Connection

This also renames clientVersion and daemonVersion to the more correct
protoVersion (since it's the version agreed to by both sides).
This commit is contained in:
Eelco Dolstra 2024-07-17 15:27:15 +02:00
parent 8ce4287409
commit c1d5cf6f34
8 changed files with 100 additions and 130 deletions

View file

@ -1526,10 +1526,11 @@ void LocalDerivationGoal::startDaemon()
debug("received daemon connection");
auto workerThread = std::thread([store, remote{std::move(remote)}]() {
FdSource from(remote.get());
FdSink to(remote.get());
try {
daemon::processConnection(store, from, to,
daemon::processConnection(
store,
FdSource(remote.get()),
FdSink(remote.get()),
NotTrusted, daemon::Recursive);
debug("terminated daemon connection");
} catch (SystemError &) {