aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hiredis/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/hiredis/net.c')
-rw-r--r--contrib/hiredis/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/hiredis/net.c b/contrib/hiredis/net.c
index c208eb10d..97fd42c23 100644
--- a/contrib/hiredis/net.c
+++ b/contrib/hiredis/net.c
@@ -367,8 +367,6 @@ addrretry:
goto error;
}
}
- if (blocking && redisSetBlocking(c,1) != REDIS_OK)
- goto error;
if (redisSetTcpNoDelay(c) != REDIS_OK)
goto error;
if (connect(s,p->ai_addr,p->ai_addrlen) == -1) {
@@ -393,6 +391,8 @@ addrretry:
rv = REDIS_OK;
goto end;
}
+ if (blocking && redisSetBlocking(c,1) != REDIS_OK)
+ goto error;
if (p == NULL) {
char buf[128];
snprintf(buf,sizeof(buf),"Can't create socket: %s",strerror(errno));