diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-05-06 00:28:18 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-05-06 00:28:18 -0500 |
| commit | 9e3f72c375b74c8e61df237033292a58dbdb7aae (patch) | |
| tree | b9aa3b77f8c1469b77c34c183f3f680156c31765 | |
| parent | 0f233c6ad83eaa7abe2469c657eda374d19ab089 (diff) | |
| parent | 4f489fa6a2e868a6755b124cd665f0d4d75c8318 (diff) | |
| download | monzero-core-9e3f72c375b74c8e61df237033292a58dbdb7aae.tar.gz monzero-core-9e3f72c375b74c8e61df237033292a58dbdb7aae.tar.xz monzero-core-9e3f72c375b74c8e61df237033292a58dbdb7aae.zip | |
Merge pull request #6480
4f489fa wallet2: check_connection return false on get_version status != OK (xiphon)
| -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 a9f454209..d56c80105 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5494,13 +5494,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; |
