diff options
author | Leo Famulari <leo@famulari.name> | 2017-07-23 03:42:12 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-07-23 03:42:12 -0400 |
commit | 6c1a317e29c45e85e3a0e050612cdefe470b100c (patch) | |
tree | e65dedf933090b1a9f8398655b3b20eba49fae96 /nix/nix-daemon/nix-daemon.cc | |
parent | b7158b767b7fd9f0379dfe08083c48a0cf0f3d50 (diff) | |
parent | 9478c05955643f8ff95dabccc1e42b20abb88049 (diff) | |
download | guix-6c1a317e29c45e85e3a0e050612cdefe470b100c.tar guix-6c1a317e29c45e85e3a0e050612cdefe470b100c.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/nix-daemon/nix-daemon.cc')
-rw-r--r-- | nix/nix-daemon/nix-daemon.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 7d26b61354..deb7003d7e 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -436,7 +436,15 @@ static void performOp(bool trusted, unsigned int clientVersion, bool sign = readInt(from) == 1; startWork(); TunnelSink sink(to); - store->exportPath(path, sign, sink); + try { + store->exportPath(path, sign, sink); + } + catch (Error &e) { + /* Flush SINK beforehand or its destructor will rightfully trigger + an assertion failure. */ + sink.flush(); + throw e; + } sink.flush(); stopWork(); writeInt(1, to); |