Skip to content

Commit

Permalink
GH-525 bind_executor
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Oct 2, 2024
1 parent a7bdcfe commit 3e3a59d
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 @@ -4693,7 +4693,7 @@ namespace eosio {
strand.post([c, host, port]() {
auto resolver = std::make_shared<tcp::resolver>( c->strand.context() );
fc_dlog(logger, "resolve ${h}:${p}", ("h", host)("p", port));
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 ) {
fc_dlog(logger, "resolved ${h}:${p}", ("h", host)("p", port));
Expand All @@ -4706,7 +4706,7 @@ namespace eosio {
c->set_state(connection::connection_state::closed);
++c->consecutive_immediate_connection_close;
}
} );
} ) );
} );

return true;
Expand Down

0 comments on commit 3e3a59d

Please sign in to comment.