Skip to content

Commit

Permalink
Add prompt when Ctrl-C pressed
Browse files Browse the repository at this point in the history
Signed-off-by: hwware <[email protected]>
  • Loading branch information
hwware committed Jun 27, 2024
1 parent 28c5a17 commit a56457c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/valkey-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2273,6 +2273,8 @@ static void cliWaitForMessagesOrStdin(void) {
/* Ctrl-C pressed */
config.blocking_state_aborted = 0;
config.pubsub_mode = 0;
printf("Exiting current connection, ready to reconnect to Valkey server... \n");
fflush(stdout);
if (cliConnect(CC_FORCE) != REDIS_OK) {
cliPrintContextError();
exit(1);
Expand Down

0 comments on commit a56457c

Please sign in to comment.