aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/download.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index d450714ca..72a08ef00 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -609,10 +609,8 @@ struct CurlDownloader : public Downloader
ref<Downloader> getDownloader()
{
- static std::shared_ptr<Downloader> downloader;
- static std::once_flag downloaderCreated;
- std::call_once(downloaderCreated, [&]() { downloader = makeDownloader(); });
- return ref<Downloader>(downloader);
+ static ref<Downloader> downloader = makeDownloader();
+ return downloader;
}
ref<Downloader> makeDownloader()