We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
maxRetries
redis_sock_configure
1 parent f9f609e commit e9e9e49Copy full SHA for e9e9e49
1 file changed
library.c
@@ -3049,6 +3049,12 @@ redis_sock_configure(RedisSock *redis_sock, HashTable *opts)
3049
} else {
3050
redis_sock->persistent = zval_is_true(val);
3051
}
3052
+ } else if (zend_string_equals_literal_ci(zkey, "maxRetries")) {
3053
+ if (Z_TYPE_P(val) != IS_LONG || Z_LVAL_P(val) < 0) {
3054
+ REDIS_VALUE_EXCEPTION("Max retries must be a non-negative integer");
3055
+ return FAILURE;
3056
+ }
3057
+ redis_sock->max_retries = zval_get_long(val);
3058
} else if (zend_string_equals_literal_ci(zkey, "retryInterval")) {
3059
if (Z_TYPE_P(val) != IS_LONG && Z_TYPE_P(val) != IS_DOUBLE) {
3060
REDIS_VALUE_EXCEPTION("Invalid retry interval");
0 commit comments