diff options
| author | valentinogeron <valentino@redislabs.com> | 2020-06-19 07:45:25 +0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-18 21:45:25 -0700 | 
| commit | a28de70a0196275317642eb60f8387a2ee950330 (patch) | |
| tree | 7a73448447e3a1358a4ee8f3f5c1b86e8199b0ab /hiredis.c | |
| parent | 6448f735d5663c7c58aa269d8f53f06c4640ef5a (diff) | |
| download | hiredict-a28de70a0196275317642eb60f8387a2ee950330.tar.xz | |
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.c | 4 | 
1 files changed, 1 insertions, 3 deletions
@@ -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;  }  | 
