Skip to content

Commit

Permalink
fix(storage): when cbd is stopped, the conflict_manager must stop... (#…
Browse files Browse the repository at this point in the history
…103)

trying to establish connections.

REFS: MON-11553
  • Loading branch information
bouda1 committed Dec 10, 2021
1 parent 24e74a5 commit 7729f85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion centreon-broker/storage/src/conflict_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <cassert>
#include <cstring>

#include "com/centreon/broker/config/applier/init.hh"
#include "com/centreon/broker/database/mysql_result.hh"
#include "com/centreon/broker/log_v2.hh"
#include "com/centreon/broker/multiplexing/publisher.hh"
Expand Down Expand Up @@ -134,7 +135,8 @@ bool conflict_manager::init_storage(bool store_in_db,
for (count = 0; count < 60; count++) {
/* Let's wait for 60s for the conflict_manager to be initialized */
if (_init_cv.wait_for(lk, std::chrono::seconds(1), [&] {
return _singleton != nullptr || _state == finished;
return _singleton != nullptr || _state == finished ||
config::applier::mode == config::applier::finished;
})) {
if (_state == finished)
return false;
Expand Down

0 comments on commit 7729f85

Please sign in to comment.