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

Commit

Permalink
read_delay_timer runs on net_plugin thread_pool so app().post for exe…
Browse files Browse the repository at this point in the history
…cution of start_read_message
  • Loading branch information
heifner committed Apr 8, 2019
1 parent 5baec5b commit 2122f84
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2044,12 +2044,13 @@ namespace eosio {
}
if( !conn->read_delay_timer ) return;
conn->read_delay_timer->expires_from_now( def_read_delay_for_full_write_queue );
conn->read_delay_timer->async_wait(
app().get_priority_queue().wrap( priority::low, [this, weak_conn]( boost::system::error_code ) {
auto conn = weak_conn.lock();
if( !conn ) return;
start_read_message( conn );
} ) );
conn->read_delay_timer->async_wait( [this, weak_conn]( boost::system::error_code ec ) {
app().post( priority::low, [this, weak_conn]() {
auto conn = weak_conn.lock();
if( !conn ) return;
start_read_message( conn );
} );
} );
return;
}

Expand Down

0 comments on commit 2122f84

Please sign in to comment.