summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
Diffstat (limited to 'api/src')
-rw-r--r--api/src/glfs-mgmt.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index 045080d667a..6b65e517a67 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -792,11 +792,16 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
switch (event) {
case RPC_CLNT_DISCONNECT:
if (!ctx->active) {
- gf_msg ("glfs-mgmt", GF_LOG_ERROR, errno,
- API_MSG_REMOTE_HOST_CONN_FAILED,
- "failed to connect with remote-host: %s (%s)",
- ctx->cmd_args.volfile_server,
- strerror (errno));
+ if (rpc_trans->connect_failed)
+ gf_msg ("glfs-mgmt", GF_LOG_ERROR, 0,
+ API_MSG_REMOTE_HOST_CONN_FAILED,
+ "failed to connect to remote-host: %s",
+ ctx->cmd_args.volfile_server);
+ else
+ gf_msg ("glfs-mgmt", GF_LOG_INFO, 0,
+ API_MSG_REMOTE_HOST_CONN_FAILED,
+ "disconnected from remote-host: %s",
+ ctx->cmd_args.volfile_server);
if (!rpc->disabled) {
/*