aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-25 00:24:25 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-25 00:24:25 +0200
commit12a77ba868c879b8bd70f50b831cb163c0e6ace3 (patch)
tree9608e335feb37880cb41e9c9180a16a2c856fa0b
parentMerge pull request #2331 (diff)
parentrpc_client: print destination host/port when failing to connect (diff)
downloadmonero-12a77ba868c879b8bd70f50b831cb163c0e6ace3.tar.xz
Merge pull request #2336
2392c4c4 rpc_client: print destination host/port when failing to connect (moneromooo-monero)
-rw-r--r--src/common/rpc_client.h6
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 ?