summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd.c')
-rw-r--r--cli/src/cli-cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c
index 982d39d1b70..a9016ae3620 100644
--- a/cli/src/cli-cmd.c
+++ b/cli/src/cli-cmd.c
@@ -132,7 +132,9 @@ cli_cmd_process (struct cli_state *state, int argc, char **argv)
if ( strcmp (word->word,"help")==0 )
goto callback;
- ret = cli_cmd_await_connected (cli_cmd_needs_connection (word));
+ state->await_connected = cli_cmd_needs_connection (word);
+
+ ret = cli_cmd_await_connected (state->await_connected);
if (ret) {
cli_out ("Connection failed. Please check if gluster "
"daemon is operational.");