diff --git a/fastpair/internal/fast_pair_seeker_impl.cc b/fastpair/internal/fast_pair_seeker_impl.cc index 7f90ec77..c59ac65d 100644 --- a/fastpair/internal/fast_pair_seeker_impl.cc +++ b/fastpair/internal/fast_pair_seeker_impl.cc @@ -52,10 +52,10 @@ FastPairSeekerImpl::~FastPairSeekerImpl() { NEARBY_LOGS(INFO) << "~FastPairSeekerImpl start"; pairer_broker_->RemoveObserver(this); mediums_.GetBluetoothClassic().RemoveObserver(this); - FinishPairing(absl::AbortedError("Pairing terminated")); auto unused = StopFastPairScan(); CountDownLatch latch(1); executor_->Execute("~FastPairSeekerImpl", [this, latch]() mutable { + FinishPairing(absl::AbortedError("Pairing terminated")); pairer_broker_.reset(); executor_->Execute("sync", [latch]() mutable { latch.CountDown(); }); });