cli_wallet: Exit instead of hanging when disconnected #291
This commit is contained in:
parent
025130b096
commit
c65f37ed6b
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue