Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/libstore/filetransfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,14 @@ struct curlFileTransfer : public FileTransfer
decompressionSink.reset();
errorSink.reset();
embargo = std::chrono::steady_clock::now() + std::chrono::milliseconds(ms);
fileTransfer.enqueueItem(shared_from_this());
try {
fileTransfer.enqueueItem(shared_from_this());
} catch (const nix::Error & e) {
// If enqueue fails (e.g., during shutdown), fail the transfer properly
// instead of letting the exception propagate, which would leave done=false
// and cause the destructor to attempt a second callback invocation
fail(std::move(exc));
}
} else
fail(std::move(exc));
}
Expand Down
Loading