Skip to content

Commit

Permalink
GH-1091 Call send_block_nack on correct strand
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jan 6, 2025
1 parent b54eea7 commit 167ecb4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2159,11 +2159,13 @@ namespace eosio {
} );
}

// static, thread safe
void sync_manager::send_block_nack_resets() {
my_impl->connections.for_each_block_connection( []( const connection_ptr& ci ) {
if( ci->current() ) {
ci->send_block_nack({});
// static, thread safe
void sync_manager::send_block_nack_resets() {
my_impl->connections.for_each_block_connection( []( const connection_ptr& cp ) {
if (cp->current()) {
boost::asio::post(cp->strand, [cp]() {
cp->send_block_nack({});
});
}
} );
}
Expand Down

0 comments on commit 167ecb4

Please sign in to comment.