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

Commit

Permalink
Merge pull request #8548 from EOSIO/net-plugin-dispatch-dev
Browse files Browse the repository at this point in the history
Net plugin dispatch - develop
  • Loading branch information
heifner authored Jan 31, 2020
2 parents 2ec9956 + 1982cf9 commit a69e1e8
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 @@ -1042,7 +1042,7 @@ namespace eosio {
}

void connection::send_handshake( bool force ) {
strand.dispatch( [force, c = shared_from_this()]() {
strand.post( [force, c = shared_from_this()]() {
std::unique_lock<std::mutex> g_conn( c->conn_mtx );
if( c->populate_handshake( c->last_handshake_sent, force ) ) {
static_assert( std::is_same_v<decltype( c->sent_handshake_count ), int16_t>, "INT16_MAX based on int16_t" );
Expand Down Expand Up @@ -1096,7 +1096,7 @@ namespace eosio {
std::vector<boost::asio::const_buffer> bufs;
buffer_queue.fill_out_buffer( bufs );

strand.dispatch( [c{std::move(c)}, bufs{std::move(bufs)}]() {
strand.post( [c{std::move(c)}, bufs{std::move(bufs)}]() {
boost::asio::async_write( *c->socket, bufs,
boost::asio::bind_executor( c->strand, [c, socket=c->socket]( boost::system::error_code ec, std::size_t w ) {
try {
Expand Down

0 comments on commit a69e1e8

Please sign in to comment.