diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index e1180b541c5c8f854ede0e96e5972efee6d29df9..335655720f6bf34e4e9c4731ea06ad9d774e0263 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -142,9 +142,13 @@ namespace eos { } ~connection() { - wlog( "released connection" ); + if (peer_addr.empty()) + wlog( "released connection from client" ); + else + wlog( "released connection to server at ${addr}", ("addr", peer_addr) ); } + block_state_index block_state; transaction_state_index trx_state; sync_request_index in_sync_state; // we are requesting info from this peer @@ -366,7 +370,9 @@ namespace eos { auto socket = std::make_shared( std::ref( app().get_io_service() ) ); acceptor->async_accept( *socket, [socket,this]( boost::system::error_code ec ) { if( !ec ) { - start_session( std::make_shared( socket ) ); + connection_ptr c = std::make_shared( socket ); + connections.insert( c ); + start_session( c ); start_listen_loop(); } else { elog( "Error accepting connection: ${m}", ("m", ec.message() ) );