diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2021-06-10 16:12:25 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2021-06-10 16:12:25 +0300 |
commit | 72d6a1e42be41d480c77bbb9a9202fe2b219e051 (patch) | |
tree | c52b8e62a214243548bf09bcb0c59279c369a319 | |
parent | 2d72c55d7d0402bfdf147ba71cead38d2573e203 (diff) |
Issue #1974issue-1974
Because sentinel doesn't support `ECHO` command replace it with `PING`.
-rw-r--r-- | library.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |