cli_wallet: Exit instead of hanging when disconnected #291

This commit is contained in:
theoreticalbts 2015-09-02 14:25:06 -04:00
parent 025130b096
commit c65f37ed6b

View file

@ -179,8 +179,9 @@ int main( int argc, char** argv )
for( auto& name_formatter : wapiptr->get_result_formatters() )
wallet_cli->format_result( name_formatter.first, name_formatter.second );
boost::signals2::scoped_connection closed_connection(con->closed.connect([]{
boost::signals2::scoped_connection closed_connection(con->closed.connect([=]{
cerr << "Server has disconnected us.\n";
wallet_cli->stop();
}));
(void)(closed_connection);