Skip to content

Commit

Permalink
Change PING to ECHO to be compatible with old versions of Redis.
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Dec 7, 2019
1 parent 9dbde8d commit a5f9592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ redis_sock_check_liveness(RedisSock *redis_sock)
}
gettimeofday(&tv, NULL);
uniqid_len = snprintf(uniqid, sizeof(uniqid), "phpredis_pool:%08lx%05lx:%08" PRIx32, (long)tv.tv_sec, (long)tv.tv_usec, php_mt_rand());
redis_cmd_init_sstr(&cmd, 1, "PING", sizeof("PING") - 1);
redis_cmd_init_sstr(&cmd, 1, "ECHO", sizeof("ECHO") - 1);
redis_cmd_append_sstr(&cmd, uniqid, uniqid_len);
smart_string_0(&cmd);

Expand Down

0 comments on commit a5f9592

Please sign in to comment.