forked from lix-project/lix
nix-store --serve: Flush out after every loop
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
73874629ef
commit
5671188eb2
|
@ -259,7 +259,7 @@ string StoreAPI::makeValidityRegistration(const PathSet & paths,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void StoreAPI::serve(Source & in, Sink & out)
|
void StoreAPI::serve(Source & in, BufferedSink & out)
|
||||||
{
|
{
|
||||||
string cmd = readString(in);
|
string cmd = readString(in);
|
||||||
if (cmd == "query") {
|
if (cmd == "query") {
|
||||||
|
@ -283,6 +283,7 @@ void StoreAPI::serve(Source & in, Sink & out)
|
||||||
writeString("", out);
|
writeString("", out);
|
||||||
} else
|
} else
|
||||||
throw Error(format("Unknown serve query `%1%'") % cmd);
|
throw Error(format("Unknown serve query `%1%'") % cmd);
|
||||||
|
out.flush();
|
||||||
}
|
}
|
||||||
} else if (cmd == "substitute")
|
} else if (cmd == "substitute")
|
||||||
dumpPath(readString(in), out);
|
dumpPath(readString(in), out);
|
||||||
|
|
|
@ -251,7 +251,7 @@ public:
|
||||||
|
|
||||||
/* Serve the store for ssh substituters by taking commands
|
/* Serve the store for ssh substituters by taking commands
|
||||||
* from in and printing results to out */
|
* from in and printing results to out */
|
||||||
void serve(Source & in, Sink & out);
|
void serve(Source & in, BufferedSink & out);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue