nix-store --serve: Flush out after every loop

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2014-02-07 16:56:00 -05:00
parent 73874629ef
commit 5671188eb2
2 changed files with 3 additions and 2 deletions

View File

@ -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);
if (cmd == "query") {
@ -283,6 +283,7 @@ void StoreAPI::serve(Source & in, Sink & out)
writeString("", out);
} else
throw Error(format("Unknown serve query `%1%'") % cmd);
out.flush();
}
} else if (cmd == "substitute")
dumpPath(readString(in), out);

View File

@ -251,7 +251,7 @@ public:
/* Serve the store for ssh substituters by taking commands
* from in and printing results to out */
void serve(Source & in, Sink & out);
void serve(Source & in, BufferedSink & out);
};