From 89f556574552abe80d9afe155eb366634375846c Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 17 Jan 2011 10:51:17 +0000 Subject: glusterfsd-mgmt: handle the RPC_DISCONNECT event properly This patch solves the issue of hanging mount point in case of wrong server name is given during mount command Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 1453 (mount command didn't give error message) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1453 --- glusterfsd/src/glusterfsd-mgmt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index be8b77f4f09..bcfd966bfd2 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -443,6 +443,14 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, ctx = this->ctx; switch (event) { + case RPC_CLNT_DISCONNECT: + if (!ctx->active) { + gf_log ("glusterfsd-mgmt", GF_LOG_ERROR, + "failed to connect with remote-host: %s", + strerror (errno)); + cleanup_and_exit (1); + } + break; case RPC_CLNT_CONNECT: rpc_clnt_set_connected (&((struct rpc_clnt*)ctx->mgmt)->conn); -- cgit