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

Commit 5644c34a authored by William Escande's avatar William Escande
Browse files

Fix promises not being set to null

Test: atest RoundRobinSchedulerTest --rerun-until-failure
Fix: 264572812
Change-Id: I598a71b4055ea81469f12a6bccbb0effbe573982
parent b13bff5a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -136,8 +136,9 @@ class RoundRobinSchedulerTest : public ::testing::Test {

    packet_count_--;
    if (packet_count_ == 0) {
      packet_promise_->set_value();
      packet_promise_ = nullptr;
      std::promise<void>* prom = packet_promise_.release();
      prom->set_value();
      delete prom;
    }
  }