Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Net plugin post - develop #8563

Merged
merged 2 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/chain/thread_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace eosio { namespace chain {
//
named_thread_pool::named_thread_pool( std::string name_prefix, size_t num_threads )
: _thread_pool( num_threads )
, _ioc( num_threads )
{
_ioc_work.emplace( boost::asio::make_work_guard( _ioc ) );
for( size_t i = 0; i < num_threads; ++i ) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3085,7 +3085,7 @@ namespace eosio {

// called from application thread
void net_plugin_impl::transaction_ack(const std::pair<fc::exception_ptr, transaction_metadata_ptr>& results) {
boost::asio::post( my_impl->thread_pool->get_executor(), [this, results]() {
dispatcher->strand.post( [this, results]() {
const auto& id = results.second->id();
if (results.first) {
fc_dlog( logger, "signaled NACK, trx-id = ${id} : ${why}", ("id", id)( "why", results.first->to_detail_string() ) );
Expand Down