BinaryCacheStore: Explicitly flush file sink

The file sink is also flushed in its destructor, but we ignore any
exceptions in the destructor.

Issue #3886.
This commit is contained in:
Eelco Dolstra 2020-08-04 14:50:43 +02:00
parent ed52cf632b
commit 327b1bf378

View file

@ -169,6 +169,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, Source & narSource
TeeSource teeSource(narSource, *compressionSink);
narAccessor = makeNarAccessor(teeSource);
compressionSink->finish();
fileSink.flush();
}
auto now2 = std::chrono::steady_clock::now();