We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 720f693 + 560a596 commit 2cc5320Copy full SHA for 2cc5320
src/libstore/filetransfer.cc
@@ -600,7 +600,14 @@ struct curlFileTransfer : public FileTransfer
600
decompressionSink.reset();
601
errorSink.reset();
602
embargo = std::chrono::steady_clock::now() + std::chrono::milliseconds(ms);
603
- fileTransfer.enqueueItem(shared_from_this());
+ try {
604
+ fileTransfer.enqueueItem(shared_from_this());
605
+ } catch (const nix::Error & e) {
606
+ // If enqueue fails (e.g., during shutdown), fail the transfer properly
607
+ // instead of letting the exception propagate, which would leave done=false
608
+ // and cause the destructor to attempt a second callback invocation
609
+ fail(std::move(exc));
610
+ }
611
} else
612
fail(std::move(exc));
613
}
0 commit comments