fix new timer crash
All checks were successful
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 1m43s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m32s

This commit is contained in:
tqcq 2024-03-18 23:08:10 +08:00
parent ee34bdb1c8
commit 46baaf0b8f

View File

@ -29,7 +29,9 @@ TaskQueueTimeoutFactory::TaskQueueTimeout::Start(DurationMs duration_ms, Timeout
parent_.task_queue_.PostDelayedTaskWithPrecision(
precision_,
[timeout_id, this]() {
if (timeout_id != this->timeout_id_) { return; }
LOGV("timer", "Timeout expired: {}", timeout_id);
ASSERT(posted_task_expiration_ != std::numeric_limits<TimeMs>::max(), "");
posted_task_expiration_ = std::numeric_limits<TimeMs>::max();