diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index 7c4ebdacc1..0e4aea9c20 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -1769,6 +1769,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 throttle_timer = std::make_shared(my_impl->thread_pool.get_executor()); + throttle_timer->expires_from_now(std::chrono::milliseconds(100)); + throttle_timer->async_wait(boost::asio::bind_executor(strand, [c=shared_from_this(), throttle_timer](const boost::system::error_code& ec) { + if (!ec) + c->enqueue_sync_block(); + })); return false; } }