mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 04:30:59 +01:00
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.
This commit is contained in:
parent
3ccf3801fb
commit
a0f19d9f3a
3 changed files with 13 additions and 8 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue