diff options
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/remote-store.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 3188d9330..2373bbdc7 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -1067,27 +1067,15 @@ void RemoteStore::ConnectionHandle::withFramedSink(std::function<void(Sink & sin Finally joinStderrThread([&]() { - if (stderrThread.joinable()) { - stderrThread.join(); - if (ex) { - try { - std::rethrow_exception(ex); - } catch (...) { - ignoreException(); - } - } + stderrThread.join(); + if (ex) { + std::rethrow_exception(ex); } }); - { - FramedSink sink((*this)->to, ex); - fun(sink); - sink.flush(); - } - - stderrThread.join(); - if (ex) - std::rethrow_exception(ex); + FramedSink sink((*this)->to, ex); + fun(sink); + sink.flush(); } } |