mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 21:03:28 +01:00
wallet2: check_connection return false on get_version status != OK
This commit is contained in:
parent
57854a3e21
commit
4f489fa6a2
@ -5451,12 +5451,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::request req_t = AUTO_VAL_INIT(req_t);
|
||||||
cryptonote::COMMAND_RPC_GET_VERSION::response resp_t = AUTO_VAL_INIT(resp_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);
|
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)
|
if(version)
|
||||||
*version = 0;
|
*version = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (resp_t.status == CORE_RPC_STATUS_OK)
|
|
||||||
m_rpc_version = resp_t.version;
|
m_rpc_version = resp_t.version;
|
||||||
}
|
}
|
||||||
if (version)
|
if (version)
|
||||||
|
Loading…
Reference in New Issue
Block a user