MCPcopy Create free account
hub / github.com/F-Stack/f-stack / issueCommandRepeat

Function issueCommandRepeat

app/redis-6.2.6/src/redis-cli.c:2054–2084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2052}
2053
2054static int issueCommandRepeat(int argc, char **argv, long repeat) {
2055 while (1) {
2056 if (config.cluster_reissue_command || context == NULL ||
2057 context->err == REDIS_ERR_IO || context->err == REDIS_ERR_EOF)
2058 {
2059 if (cliConnect(CC_FORCE) != REDIS_OK) {
2060 cliPrintContextError();
2061 config.cluster_reissue_command = 0;
2062 return REDIS_ERR;
2063 }
2064 }
2065 config.cluster_reissue_command = 0;
2066 if (config.cluster_send_asking) {
2067 if (cliSendAsking() != REDIS_OK) {
2068 cliPrintContextError();
2069 return REDIS_ERR;
2070 }
2071 }
2072 if (cliSendCommand(argc,argv,repeat) != REDIS_OK) {
2073 cliPrintContextError();
2074 return REDIS_ERR;
2075 }
2076
2077 /* Issue the command again if we got redirected in cluster mode */
2078 if (config.cluster_mode && config.cluster_reissue_command) {
2079 continue;
2080 }
2081 break;
2082 }
2083 return REDIS_OK;
2084}
2085
2086static int issueCommand(int argc, char **argv) {
2087 return issueCommandRepeat(argc, argv, config.repeat);

Callers 2

issueCommandFunction · 0.85
replFunction · 0.85

Calls 4

cliConnectFunction · 0.85
cliPrintContextErrorFunction · 0.85
cliSendAskingFunction · 0.85
cliSendCommandFunction · 0.85

Tested by

no test coverage detected