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:
authormichael-grunder <michael.grunder@gmail.com>2022-10-07 21:27:23 +0300
committerMichael Grunder <michael.grunder@gmail.com>2022-10-07 21:42:38 +0300
commitab4ce4ab6f6eadbae8245fef5486674eff0d1661 (patch)
tree50d6f5f280600baa4071757d06141b4b413ef406 /redis.c
parentb9950727f5c2fe25262e9e899bc31980d7e77f5c (diff)
Allow negative timeout/read_timeout and fix doc
Co-authored-by: twosee <twose@qq.com>
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis.c b/redis.c
index e7f5506c..0e00ba8c 100644
--- a/redis.c
+++ b/redis.c
@@ -718,12 +718,12 @@ redis_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
persistent_id = NULL;
}
- if (timeout < 0L || timeout > INT_MAX) {
+ if (timeout > INT_MAX) {
REDIS_VALUE_EXCEPTION("Invalid connect timeout");
return FAILURE;
}
- if (read_timeout < 0L || read_timeout > INT_MAX) {
+ if (read_timeout > INT_MAX) {
REDIS_VALUE_EXCEPTION("Invalid read timeout");
return FAILURE;
}