diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 7902980311..38658122bf 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -58,7 +58,6 @@ #include #include -#include #include #include #include @@ -91,7 +90,7 @@ #endif #define DEFAULT_LOGGER "p2p" -//#define P2P_IN_DEDICATED_THREAD 1 +#define P2P_IN_DEDICATED_THREAD 1 #define INVOCATION_COUNTER(name) \ static unsigned total_ ## name ## _counter = 0; \ @@ -4115,8 +4114,7 @@ namespace graphene { namespace net { namespace detail { !_dump_node_status_task_done.valid()); if (_node_configuration.accept_incoming_connections) _accept_loop_complete = fc::async( [=](){ accept_loop(); }, "accept_loop"); - //_p2p_network_connect_loop_done = fc::async( [=]() { p2p_network_connect_loop(); }, "p2p_network_connect_loop" ); - fc::asio::default_io_service().post([=]() { p2p_network_connect_loop(); }); + _p2p_network_connect_loop_done = fc::async( [=]() { p2p_network_connect_loop(); }, "p2p_network_connect_loop" ); _fetch_sync_items_loop_done = fc::async( [=]() { fetch_sync_items_loop(); }, "fetch_sync_items_loop" ); _fetch_item_loop_done = fc::async( [=]() { fetch_items_loop(); }, "fetch_items_loop" ); _advertise_inventory_loop_done = fc::async( [=]() { advertise_inventory_loop(); }, "advertise_inventory_loop" );