This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new b3edc60 Fix use of deprecated Boost Asio API (#535)
b3edc60 is described below
commit b3edc60c5ca46c1df7e0090f7e418a684fd21553
Author: Andrew Rhoads <[email protected]>
AuthorDate: Tue Feb 3 20:54:34 2026 -0800
Fix use of deprecated Boost Asio API (#535)
expires_from_now is deprecated and it is now recommended to use
expires_after
---
lib/MockServer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/MockServer.h b/lib/MockServer.h
index 8e4a213..bd413d3 100644
--- a/lib/MockServer.h
+++ b/lib/MockServer.h
@@ -112,7 +112,7 @@ class MockServer : public
std::enable_shared_from_this<MockServer> {
std::function<void()>&& 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) {