Skip to content

Commit 42cc871

Browse files
committed
fix: Remove vendored boost file to compile with boost 1.87.
fix: Replace expires_from_now with expires_after.
1 parent 3772096 commit 42cc871

File tree

5 files changed

+6
-496
lines changed

5 files changed

+6
-496
lines changed

contract-tests/sse-contract-tests/src/event_outbox.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ void EventOutbox::do_shutdown(beast::error_code ec) {
3737
void EventOutbox::post_event(launchdarkly::sse::Event event) {
3838
auto http_request = build_request(callback_counter_++, std::move(event));
3939
outbox_.push(http_request);
40-
flush_timer_.expires_from_now(boost::posix_time::milliseconds(0));
40+
flush_timer_.expires_after(boost::posix_time::milliseconds(0));
4141
}
4242

4343
void EventOutbox::post_error(launchdarkly::sse::Error error) {
4444
auto http_request = build_request(callback_counter_++, error);
4545
outbox_.push(http_request);
46-
flush_timer_.expires_from_now(boost::posix_time::milliseconds(0));
46+
flush_timer_.expires_after(boost::posix_time::milliseconds(0));
4747
}
4848

4949
void EventOutbox::run() {
@@ -133,7 +133,7 @@ void EventOutbox::on_flush_timer(boost::system::error_code ec) {
133133
}
134134

135135
// If the outbox is empty, wait a bit before trying again.
136-
flush_timer_.expires_from_now(kFlushInterval);
136+
flush_timer_.expires_after(kFlushInterval);
137137
flush_timer_.async_wait(beast::bind_front_handler(
138138
&EventOutbox::on_flush_timer, shared_from_this()));
139139
}

libs/internal/src/events/asio_event_processor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void AsioEventProcessor<SDK>::ScheduleFlush() {
168168
LD_LOG(logger_, LogLevel::kDebug) << "event-processor: scheduling flush in "
169169
<< flush_interval_.count() << "ms";
170170

171-
timer_.expires_from_now(flush_interval_);
171+
timer_.expires_after(flush_interval_);
172172
timer_.async_wait([this](boost::system::error_code ec) {
173173
if (ec) {
174174
LD_LOG(logger_, LogLevel::kDebug)

libs/internal/src/events/request_worker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void RequestWorker::OnDeliveryAttempt(network::HttpResult const& result,
109109
<< tag_ << "error posting " << batch_->Count()
110110
<< " event(s) (will retry): HTTP error " << result.Status();
111111
}
112-
timer_.expires_from_now(retry_delay_);
112+
timer_.expires_after(retry_delay_);
113113
timer_.async_wait([this, callback](boost::system::error_code ec) {
114114
if (ec) {
115115
return;

libs/server-sent-events/src/client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class FoxyClient : public Client,
140140

141141
create_session();
142142
create_parser();
143-
backoff_timer_.expires_from_now(backoff_.delay());
143+
backoff_timer_.expires_after(backoff_.delay());
144144
backoff_timer_.async_wait(beast::bind_front_handler(
145145
&FoxyClient::on_backoff, shared_from_this()));
146146
}

0 commit comments

Comments
 (0)