timeout option in redisConnectWithOptions should be on connect only
When connecting with a timeout, we shouldn't also call `redisSetTimeout` which will implement a timeout for commands.
See related issue
@@ -790,9 +790,7 @@ redisContext *redisConnectWithOptions(const redisOptions *options) {
// Unknown type - FIXME - FREE
return NULL;
}
- if (options->timeout != NULL && (c->flags & REDIS_BLOCK) && c->fd != REDIS_INVALID_FD) {
- redisContextSetTimeout(c, *options->timeout);
- }
+
return c;
}
