Skip to content

Commit

Permalink
GH-882 release branch not updated to use use new strand, use bind_exe…
Browse files Browse the repository at this point in the history
…cutor instead
  • Loading branch information
heifner committed Oct 7, 2024
1 parent 7f2f7e0 commit dbc9f5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1766,12 +1766,12 @@ namespace eosio {
if( current_rate_sec >= block_sync_rate_limit ) {
block_sync_throttling = true;
peer_dlog( this, "throttling block sync to peer ${host}:${port}", ("host", log_remote_endpoint_ip)("port", log_remote_endpoint_port));
std::shared_ptr<boost::asio::steady_timer> throttle_timer = std::make_shared<boost::asio::steady_timer>(strand);
std::shared_ptr<boost::asio::steady_timer> throttle_timer = std::make_shared<boost::asio::steady_timer>(my_impl->thread_pool.get_executor());
throttle_timer->expires_from_now(std::chrono::milliseconds(100));
throttle_timer->async_wait([this, throttle_timer](const boost::system::error_code& ec) {
throttle_timer->async_wait(boost::asio::bind_executor(strand, [this, throttle_timer](const boost::system::error_code& ec) {
if (!ec)
enqueue_sync_block();
});
}));
return false;
}
}
Expand Down

0 comments on commit dbc9f5f

Please sign in to comment.