diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-22 12:00:37 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-23 21:31:44 +0100 |
commit | 2392c4c41e2cfb813d3734b7eecc4ed27da9e1fc (patch) | |
tree | bd173135ef4e8416be07fd19cbcc76a9bb80f881 | |
parent | Merge pull request #2303 (diff) | |
download | monero-2392c4c41e2cfb813d3734b7eecc4ed27da9e1fc.tar.xz |
rpc_client: print destination host/port when failing to connect
-rw-r--r-- | src/common/rpc_client.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/rpc_client.h b/src/common/rpc_client.h index 8494b4a60..297020ef2 100644 --- a/src/common/rpc_client.h +++ b/src/common/rpc_client.h @@ -69,7 +69,7 @@ namespace tools bool ok = connection.is_open(); if (!ok) { - fail_msg_writer() << "Couldn't connect to daemon"; + fail_msg_writer() << "Couldn't connect to daemon: " << m_http_client.get_host() << ":" << m_http_client.get_port(); return false; } ok = ok && epee::net_utils::invoke_http_json_rpc("/json_rpc", method_name, req, res, m_http_client, t_http_connection::TIMEOUT()); @@ -98,7 +98,7 @@ namespace tools ok = ok && epee::net_utils::invoke_http_json_rpc("/json_rpc", method_name, req, res, m_http_client, t_http_connection::TIMEOUT()); if (!ok) { - fail_msg_writer() << "Couldn't connect to daemon"; + fail_msg_writer() << "Couldn't connect to daemon: " << m_http_client.get_host() << ":" << m_http_client.get_port(); return false; } else if (res.status != CORE_RPC_STATUS_OK) // TODO - handle CORE_RPC_STATUS_BUSY ? @@ -126,7 +126,7 @@ namespace tools ok = ok && epee::net_utils::invoke_http_json(relative_url, req, res, m_http_client, t_http_connection::TIMEOUT()); if (!ok) { - fail_msg_writer() << "Couldn't connect to daemon"; + fail_msg_writer() << "Couldn't connect to daemon: " << m_http_client.get_host() << ":" << m_http_client.get_port(); return false; } else if (res.status != CORE_RPC_STATUS_OK) // TODO - handle CORE_RPC_STATUS_BUSY ? |