diff options
-rw-r--r-- | library.c | 2 | ||||
-rw-r--r-- | redis.c | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -1810,6 +1810,8 @@ redis_sock_check_liveness(RedisSock *redis_sock) /* Check socket liveness using 0 second timeout */ if (php_stream_set_option(redis_sock->stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL) != PHP_STREAM_OPTION_RETURN_OK) { return FAILURE; + } else if (!INI_INT("redis.pconnect.echo_check_liveness")) { + return SUCCESS; } if (redis_sock->auth) { @@ -90,6 +90,7 @@ PHP_INI_BEGIN() /* redis pconnect */ PHP_INI_ENTRY("redis.pconnect.pooling_enabled", "1", PHP_INI_ALL, NULL) PHP_INI_ENTRY("redis.pconnect.connection_limit", "0", PHP_INI_ALL, NULL) + PHP_INI_ENTRY("redis.pconnect.echo_check_liveness", "1", PHP_INI_ALL, NULL) /* redis session */ PHP_INI_ENTRY("redis.session.locking_enabled", "0", PHP_INI_ALL, NULL) |