diff --git a/lib/MockServer.h b/lib/MockServer.h index 8e4a2136..bd413d33 100644 --- a/lib/MockServer.h +++ b/lib/MockServer.h @@ -112,7 +112,7 @@ class MockServer : public std::enable_shared_from_this { std::function&& task) { auto timer = connection->executor_->createDeadlineTimer(); pendingTimers_[key] = timer; - timer->expires_from_now(std::chrono::milliseconds(delayMs)); + timer->expires_after(std::chrono::milliseconds(delayMs)); LOG_INFO("Mock scheduling " << key << " with delay " << delayMs << " ms"); auto self = shared_from_this(); timer->async_wait([this, self, key, connection, task{std::move(task)}](const auto& ec) {