diff --git a/folly/Singleton.h b/folly/Singleton.h index 3aae996bec9..27b17edd4d2 100644 --- a/folly/Singleton.h +++ b/folly/Singleton.h @@ -497,6 +497,7 @@ class SingletonVault { bool eagerInitComplete() const; size_t livingSingletonCount() const { + auto state = state_.rlock(); auto singletons = singletons_.rlock(); size_t ret = 0;