wallet2: check_connection return false on get_version status != OK

This commit is contained in:
xiphon 2020-04-26 13:06:41 +00:00 committed by wowario
parent 0e59f26064
commit 30ed4a23bf
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111
1 changed files with 2 additions and 3 deletions

View File

@ -5496,12 +5496,11 @@ bool wallet2::check_connection(uint32_t *version, bool *ssl, uint32_t timeout)
cryptonote::COMMAND_RPC_GET_VERSION::request req_t = AUTO_VAL_INIT(req_t);
cryptonote::COMMAND_RPC_GET_VERSION::response resp_t = AUTO_VAL_INIT(resp_t);
bool r = invoke_http_json_rpc("/json_rpc", "get_version", req_t, resp_t);
if(!r) {
if(!r || resp_t.status != CORE_RPC_STATUS_OK) {
if(version)
*version = 0;
return false;
}
if (resp_t.status == CORE_RPC_STATUS_OK)
m_rpc_version = resp_t.version;
}
if (version)