Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 030eef66 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "Lock mutex when accessing the idle_promise_"

parents 9baaf445 0abf20ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ class LeAclConnectionTest : public ::testing::Test {

  void sync_handler() {
    ASSERT(thread_ != nullptr);
    ASSERT_TRUE(thread_->GetReactor()->WaitForIdle(2s));
    ASSERT(thread_->GetReactor()->WaitForIdle(2s));
  }

  AddressWithType address_1 =
+1 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ void Reactor::Run() {
    if (waiting_for_idle && count == 0) {
      timeout_ms = -1;
      waiting_for_idle = false;
      std::scoped_lock<std::mutex> lock(mutex_);
      idle_promise_->set_value();
      idle_promise_ = nullptr;
    }