From: Mikhail Galanin Date: Mon, 24 Sep 2018 15:18:43 +0000 (+0100) Subject: [Minor] "blocking mode" indeed should be set later X-Git-Tag: 1.8.1~164^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8c2648b6688277ddc662b98c861934e050ce1221;p=rspamd.git [Minor] "blocking mode" indeed should be set later --- 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));