BasicClientConnection::handshake(): Don't send our version twice

This was accidentally introduced
in f71b4da0b3.  We didn't notice this
because the version got interpreted by the daemon as the obsolete "CPU
affinity will follow" field, and being non-zero, it would then read
another integer for the ignored CPU affinity.
This commit is contained in:
Eelco Dolstra 2024-07-17 16:44:34 +02:00
parent 464e5925cb
commit 87f8ff23fe

View file

@ -152,7 +152,6 @@ WorkerProto::BasicClientConnection::handshake(BufferedSink & to, Source & from,
throw Error("Nix daemon protocol version not supported");
if (GET_PROTOCOL_MINOR(daemonVersion) < 10)
throw Error("the Nix daemon version is too old");
to << localVersion;
return std::min(daemonVersion, localVersion);
}