Skip to content

Commit b3edc60

Browse files
authored
Fix use of deprecated Boost Asio API (#535)
expires_from_now is deprecated and it is now recommended to use expires_after
1 parent 0b893a1 commit b3edc60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/MockServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class MockServer : public std::enable_shared_from_this<MockServer> {
112112
std::function<void()>&& task) {
113113
auto timer = connection->executor_->createDeadlineTimer();
114114
pendingTimers_[key] = timer;
115-
timer->expires_from_now(std::chrono::milliseconds(delayMs));
115+
timer->expires_after(std::chrono::milliseconds(delayMs));
116116
LOG_INFO("Mock scheduling " << key << " with delay " << delayMs << " ms");
117117
auto self = shared_from_this();
118118
timer->async_wait([this, self, key, connection, task{std::move(task)}](const auto& ec) {

0 commit comments

Comments
 (0)