aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hiredis/net.c
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-09-24 16:18:43 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-09-24 16:18:43 +0100
commit8c2648b6688277ddc662b98c861934e050ce1221 (patch)
tree9c1463af6c174e0bed7fcea765a7a40906aafc5f /contrib/hiredis/net.c
parente637e15306f18e27767941be4670b7091056ccc4 (diff)
downloadrspamd-8c2648b6688277ddc662b98c861934e050ce1221.tar.gz
rspamd-8c2648b6688277ddc662b98c861934e050ce1221.zip
[Minor] "blocking mode" indeed should be set later
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));