mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Internal bug fix
PiperOrigin-RevId: 522474442
This commit is contained in:
committed by
Copybara-Service
parent
5d4cf93aed
commit
87e044fa89
@@ -92,7 +92,18 @@ bool Timer::FireNow() {
|
||||
return false;
|
||||
}
|
||||
|
||||
callback_();
|
||||
if (task_executor_ == nullptr) {
|
||||
task_executor_ = std::make_unique<SubmittableExecutor>();
|
||||
}
|
||||
|
||||
if (task_executor_ == nullptr) {
|
||||
NEARBY_LOGS(ERROR)
|
||||
<< "Failed to fire the task due to cannot create executor.";
|
||||
return false;
|
||||
}
|
||||
|
||||
task_executor_->Execute([&]() { callback_(); });
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user