Skip to content

Commit

Permalink
Fixed formatting errors
Browse files Browse the repository at this point in the history
Signed-off-by: Nikhil Manglore <[email protected]>
  • Loading branch information
Nikhil-Manglore committed Jan 8, 2025
1 parent 9aff4d8 commit 6aebdb9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/valkey-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2228,13 +2228,11 @@ static int cliReadReply(int output_raw_strings) {
fflush(stdout);
sdsfree(out);
}

return REDIS_OK;
}

/* Helper method to handle pubsub subscription/unsubscription. */
static void handlePubSubMode(redisReply *reply) {

char *cmd = reply->element[0]->str;
int count = reply->element[2]->integer;

Expand All @@ -2253,7 +2251,6 @@ static void handlePubSubMode(redisReply *reply) {
config.pubsub_mode = 1;
cliRefreshPrompt();
}

}

/* Simultaneously wait for pubsub messages from the server and input on stdin. */
Expand Down Expand Up @@ -2430,7 +2427,7 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
fflush(stdout);
if (config.pubsub_mode || num_expected_pubsub_push > 0) {
if (isPubsubPush(config.last_reply)) {
handlePubSubMode(config.last_reply);
handlePubSubMode(config.last_reply);

if (num_expected_pubsub_push > 0 && !strcasecmp(config.last_reply->element[0]->str, command)) {
/* This pushed message confirms the
Expand Down

0 comments on commit 6aebdb9

Please sign in to comment.