Skip to content

Commit

Permalink
shell: Do not report error when starting instance
Browse files Browse the repository at this point in the history
Based on review feedback
  • Loading branch information
Chris Townsend committed Feb 27, 2019
1 parent 5730255 commit f9b67f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/client/cmd/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ mp::ReturnCode cmd::Shell::run(mp::ArgParser* parser)
// We can assume the first array entry since `shell` only uses one instance
// at a time
auto instance_name = request.instance_name()[0];

auto on_success = [this](mp::SSHInfoReply& reply) {
// TODO: mainly for testing - need a better way to test parsing
if (reply.ssh_info().empty())
Expand Down Expand Up @@ -64,13 +65,14 @@ mp::ReturnCode cmd::Shell::run(mp::ArgParser* parser)
};

auto on_failure = [this, &instance_name](grpc::Status& status) {
auto ret = standard_failure_handler_for(name(), cerr, status);
if (status.error_code() == grpc::StatusCode::ABORTED)
{
return start_instance_for(instance_name);
}

return ret;
else
{
return standard_failure_handler_for(name(), cerr, status);
}
};

request.set_verbosity_level(parser->verbosityLevel());
Expand Down

0 comments on commit f9b67f3

Please sign in to comment.