diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index 37da44da8..96673a5b0 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -281,8 +281,8 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore auto maxThreads = std::thread::hardware_concurrency(); - auto executor = - std::make_shared(maxThreads); + static std::shared_ptr + executor = std::make_shared(maxThreads); TransferManagerConfiguration transferConfig(executor.get());