aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-24 14:22:55 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-24 14:22:55 +0200
commit1e7f783f6901dc46e90da13926c725d477f4f443 (patch)
tree3e5f4944883eb6e9a28bd3ccc2092b77a0d59d3a /src
parentMerge pull request #1794 (diff)
parentwallet2: fix wrong status on daemon shutdown/startup (diff)
downloadmonero-1e7f783f6901dc46e90da13926c725d477f4f443.tar.xz
Merge pull request #1776
e4dbea97 wallet2: fix wrong status on daemon shutdown/startup (Jaquee)
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 385f73ade..24403f6ae 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2298,7 +2298,11 @@ bool wallet2::check_connection(uint32_t *version, uint32_t timeout)
req_t.id = epee::serialization::storage_entry(0);
req_t.method = "get_version";
bool r = net_utils::invoke_http_json("/json_rpc", req_t, resp_t, m_http_client);
- if (!r || resp_t.result.status != CORE_RPC_STATUS_OK)
+ if(!r) {
+ *version = 0;
+ return false;
+ }
+ if (resp_t.result.status != CORE_RPC_STATUS_OK)
*version = 0;
else
*version = resp_t.result.version;