diff options
author | saturneric <[email protected]> | 2024-11-25 18:41:59 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-11-25 18:41:59 +0000 |
commit | d266c6aa7a272ee0f8e96fef6f8b814c22c375c3 (patch) | |
tree | afa19cf069432f1707218b2a9d8b37e9a7b601f8 /src | |
parent | fix: no need to call trigger event from another thread (diff) | |
download | GpgFrontend-d266c6aa7a272ee0f8e96fef6f8b814c22c375c3.tar.gz GpgFrontend-d266c6aa7a272ee0f8e96fef6f8b814c22c375c3.zip |
fix: remove bug on module register monitoring
Diffstat (limited to 'src')
-rw-r--r-- | src/core/GpgCoreInit.cpp | 2 | ||||
-rw-r--r-- | src/core/module/GlobalModuleContext.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index bb0b75fe..33893719 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -643,6 +643,8 @@ void StartMonitorCoreInitializationStatus() { Module::ModuleManager::GetInstance().IsAllModulesRegistered(); for (;;) { if (module_init_done) break; + module_init_done = + Module::ModuleManager::GetInstance().IsAllModulesRegistered(); LOG_D() << "monitor: some modules are still going to be registered, " "waiting..."; diff --git a/src/core/module/GlobalModuleContext.cpp b/src/core/module/GlobalModuleContext.cpp index 25ddce65..71ea85d2 100644 --- a/src/core/module/GlobalModuleContext.cpp +++ b/src/core/module/GlobalModuleContext.cpp @@ -341,7 +341,9 @@ class GlobalModuleContext::Impl { return module_info->get()->listening_event_ids; } - auto GetRegisteredModuleNum() const -> int { return registered_modules_; } + [[nodiscard]] auto GetRegisteredModuleNum() const -> int { + return registered_modules_; + } private: struct ModuleRegisterInfo { |