diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-08-27 14:48:08 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-08-27 14:50:51 +0200 |
commit | a0f19d9f3a009961869a077922f15986ce05738e (patch) | |
tree | 5f76da103a1250166d3f32364831134ac0603428 /src/libstore/remote-store.hh | |
parent | 3ccf3801fb1c3aac6a170318d367bc2e75ac590e (diff) |
RemoteStore::addToStore(): Fix race between stderrThread and NAR writer
As pointed out by @B4dM4n, the call to to.flush() on stderrThread is
unsafe because the NAR writer thread is also writing to 'to'.
Fixes #3943.
Diffstat (limited to 'src/libstore/remote-store.hh')
-rw-r--r-- | src/libstore/remote-store.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh index b319e774b..7cf4c4d12 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/remote-store.hh @@ -114,7 +114,7 @@ protected: virtual ~Connection(); - std::exception_ptr processStderr(Sink * sink = 0, Source * source = 0); + std::exception_ptr processStderr(Sink * sink = 0, Source * source = 0, bool flush = true); }; ref<Connection> openConnectionWrapper(); |