aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-27 14:48:08 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-27 14:50:51 +0200
commita0f19d9f3a009961869a077922f15986ce05738e (patch)
tree5f76da103a1250166d3f32364831134ac0603428 /src/libstore/remote-store.hh
parent3ccf3801fb1c3aac6a170318d367bc2e75ac590e (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.hh2
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();