diff options
author | xiphon <xiphon@protonmail.com> | 2020-04-26 13:06:41 +0000 |
---|---|---|
committer | xiphon <xiphon@protonmail.com> | 2020-04-26 13:08:17 +0000 |
commit | 4f489fa6a2e868a6755b124cd665f0d4d75c8318 (patch) | |
tree | 2e4d6e7960f619e941cef43b5be8efe00583a20f /src | |
parent | Merge pull request #6314 (diff) | |
download | monero-4f489fa6a2e868a6755b124cd665f0d4d75c8318.tar.xz |
wallet2: check_connection return false on get_version status != OK
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index bc8219c69..7bc811212 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5451,13 +5451,12 @@ 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; + m_rpc_version = resp_t.version; } if (version) *version = m_rpc_version; |