Skip to content

Commit

Permalink
GH-525 bind_executor to connection strand
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Oct 7, 2024
1 parent ebd8e54 commit 4c9e293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4689,7 +4689,7 @@ namespace eosio {

strand.post([c, host, port]() {
auto resolver = std::make_shared<tcp::resolver>( my_impl->thread_pool.get_executor() );
resolver->async_resolve(host, port,
resolver->async_resolve(host, port, boost::asio::bind_executor(c->strand,
[resolver, c, host, port]
( const boost::system::error_code& err, const tcp::resolver::results_type& results ) {
c->set_heartbeat_timeout( my_impl->connections.get_heartbeat_timeout() );
Expand All @@ -4701,7 +4701,7 @@ namespace eosio {
c->set_state(connection::connection_state::closed);
++c->consecutive_immediate_connection_close;
}
} );
} ) );
} );

return true;
Expand Down

0 comments on commit 4c9e293

Please sign in to comment.