diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index 352feb720..2fc28e345 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -712,7 +712,7 @@ struct curlFileTransfer : public FileTransfer } } - std::shared_ptr enqueueItem(std::shared_ptr item) + void enqueueItem(std::shared_ptr item) { if (item->uploadData && !item->uri.starts_with("http://") @@ -726,7 +726,6 @@ struct curlFileTransfer : public FileTransfer state->incoming.push(item); } wakeup(); - return item; } #if ENABLE_S3 @@ -857,7 +856,7 @@ struct curlFileTransfer : public FileTransfer auto _state = std::make_shared>(); - auto item = enqueueItem(std::make_shared( + auto item = std::make_shared( *this, uri, headers, @@ -888,7 +887,8 @@ struct curlFileTransfer : public FileTransfer }, std::move(data), noBody - )); + ); + enqueueItem(item); struct TransferSource : Source {