From 535fc869b505af528043760adbe5a9424ca2c485 Mon Sep 17 00:00:00 2001 From: Valera Cogut Date: Thu, 19 Jul 2018 09:48:47 +0300 Subject: [PATCH] remove hard coded method check to result check from quit command --- src/rpc/cli.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/rpc/cli.cpp b/src/rpc/cli.cpp index 5ca1447..2788f49 100644 --- a/src/rpc/cli.cpp +++ b/src/rpc/cli.cpp @@ -14,6 +14,12 @@ # endif #endif +#ifdef WIN32 +# include +#else +# include +#endif + namespace fc { namespace rpc { static std::vector& cli_commands() @@ -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 )