summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2013-04-10 08:58:09 -0700
committerPieter Noordhuis <pcnoordhuis@gmail.com>2013-04-10 08:58:09 -0700
commit63ce20dd15f83c6ff2bdab1bf3dcd1866e826c71 (patch)
treeac3762c1da428bfb84270160bddeca64f57ec4ef /net.c
parent6bd1172419a385673c9f893d0a75c4220f87a5bb (diff)
parentfca66b9e8baf760c8bec306f31162b510b04f572 (diff)
Merge pull request #156 from abedra/master
Set error on invalid timval values for redisConnectWithTimeout (Fixes #154)
Diffstat (limited to 'net.c')
-rw-r--r--net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net.c b/net.c
index 82ab2b4..a495715 100644
--- a/net.c
+++ b/net.c
@@ -136,6 +136,7 @@ static int redisContextWaitReady(redisContext *c, int fd, const struct timeval *
/* Only use timeout when not NULL. */
if (timeout != NULL) {
if (timeout->tv_usec > 1000000 || timeout->tv_sec > __MAX_MSEC) {
+ __redisSetErrorFromErrno(c, REDIS_ERR_IO, NULL);
close(fd);
return REDIS_ERR;
}