diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-24 16:18:43 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-24 16:18:43 +0100 |
commit | 8c2648b6688277ddc662b98c861934e050ce1221 (patch) | |
tree | 9c1463af6c174e0bed7fcea765a7a40906aafc5f /contrib/hiredis/net.c | |
parent | e637e15306f18e27767941be4670b7091056ccc4 (diff) | |
download | rspamd-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.c | 4 |
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)); |