mirror of
https://github.com/NixOS/nix
synced 2025-07-06 09:11:47 +02:00
nix-store --serve: Implement log size limit
This commit is contained in:
parent
9ffc4f4363
commit
1abda8e173
4 changed files with 8 additions and 4 deletions
|
@ -853,7 +853,7 @@ static void opServe(Strings opFlags, Strings opArgs)
|
|||
if (magic != SERVE_MAGIC_1) throw Error("protocol mismatch");
|
||||
out << SERVE_MAGIC_2 << SERVE_PROTOCOL_VERSION;
|
||||
out.flush();
|
||||
readInt(in); // Client version, unused for now
|
||||
unsigned int clientVersion = readInt(in);
|
||||
|
||||
auto getBuildSettings = [&]() {
|
||||
// FIXME: changing options here doesn't work if we're
|
||||
|
@ -863,6 +863,8 @@ static void opServe(Strings opFlags, Strings opArgs)
|
|||
settings.useSubstitutes = false;
|
||||
settings.maxSilentTime = readInt(in);
|
||||
settings.buildTimeout = readInt(in);
|
||||
if (GET_PROTOCOL_MINOR(clientVersion) >= 2)
|
||||
settings.maxLogSize = readInt(in);
|
||||
};
|
||||
|
||||
while (true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue