Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-06-10 16:12:25 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2021-06-10 16:12:25 +0300
commit72d6a1e42be41d480c77bbb9a9202fe2b219e051 (patch)
treec52b8e62a214243548bf09bcb0c59279c369a319
parent2d72c55d7d0402bfdf147ba71cead38d2573e203 (diff)
Issue #1974issue-1974
Because sentinel doesn't support `ECHO` command replace it with `PING`.
-rw-r--r--library.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/library.c b/library.c
index 87b6bfa8..19173999 100644
--- a/library.c
+++ b/library.c
@@ -2205,7 +2205,7 @@ redis_sock_check_liveness(RedisSock *redis_sock)
/* ECHO challenge/response */
idlen = redis_uniqid(id, sizeof(id));
- REDIS_CMD_INIT_SSTR_STATIC(&cmd, 1, "ECHO");
+ REDIS_CMD_INIT_SSTR_STATIC(&cmd, 1, "PING");
redis_cmd_append_sstr(&cmd, id, idlen);
/* Send command(s) and make sure we can consume reply(ies) */
@@ -2242,7 +2242,7 @@ redis_sock_check_liveness(RedisSock *redis_sock)
}
}
- /* check echo response */
+ /* check ping response */
if (*inbuf != TYPE_BULK || atoi(inbuf + 1) != idlen ||
redis_sock_gets(redis_sock, inbuf, sizeof(inbuf) - 1, &len) < 0 ||
strncmp(inbuf, id, idlen) != 0