summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
authorvalentinogeron <valentino@redislabs.com>2020-06-19 07:45:25 +0300
committerGitHub <noreply@github.com>2020-06-18 21:45:25 -0700
commita28de70a0196275317642eb60f8387a2ee950330 (patch)
tree7a73448447e3a1358a4ee8f3f5c1b86e8199b0ab /hiredis.c
parent6448f735d5663c7c58aa269d8f53f06c4640ef5a (diff)
timeout option in redisConnectWithOptions should be on connect only (#829)
When connecting with a timeout, we shouldn't also call `redisSetTimeout` which will implement a timeout for commands. See related issue #722
Diffstat (limited to 'hiredis.c')
-rw-r--r--hiredis.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hiredis.c b/hiredis.c
index 4487134..7eaa991 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -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;
}