Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2925bdc6
Commit
2925bdc6
authored
Jan 02, 2019
by
Angus Pearson
Browse files
Add comment explaining negative repeat
parent
2f6ed933
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
2925bdc6
...
@@ -1141,6 +1141,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
...
@@ -1141,6 +1141,8 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
for (j = 0; j < argc; j++)
for (j = 0; j < argc; j++)
argvlen[j] = sdslen(argv[j]);
argvlen[j] = sdslen(argv[j]);
/* Negative repeat is allowed and causes infinite loop,
works well with the interval option. */
while(repeat < 0 || repeat-- > 0) {
while(repeat < 0 || repeat-- > 0) {
redisAppendCommandArgv(context,argc,(const char**)argv,argvlen);
redisAppendCommandArgv(context,argc,(const char**)argv,argvlen);
while (config.monitor_mode) {
while (config.monitor_mode) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment