Commit 2925bdc6 authored by Angus Pearson's avatar Angus Pearson
Browse files

Add comment explaining negative repeat

parent 2f6ed933
...@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment