diff options
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r-- | src/libstore/download.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index d450714ca50f..72a08ef0089c 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() |