Skip to content

Commit

Permalink
remove hard coded method check to result check from quit command
Browse files Browse the repository at this point in the history
  • Loading branch information
nanomobile committed Jul 19, 2018
1 parent 0486a5f commit 535fc86
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/rpc/cli.cpp
Expand Up @@ -14,6 +14,12 @@
# endif
#endif

#ifdef WIN32
# include <signal.h>
#else
# include <csignal>
#endif

namespace fc { namespace rpc {

static std::vector<std::string>& cli_commands()
Expand Down Expand Up @@ -104,9 +110,9 @@ void cli::run()
else
std::cout << itr->second( result, args ) << "\n";

if (method == "quit")
if (result.is_integer() && result.as_int64() == SIGQUIT)
{
stop();
break;
}
}
catch ( const fc::exception& e )
Expand Down

0 comments on commit 535fc86

Please sign in to comment.