From 8c2648b6688277ddc662b98c861934e050ce1221 Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Mon, 24 Sep 2018 16:18:43 +0100 Subject: [PATCH] [Minor] "blocking mode" indeed should be set later --- contrib/hiredis/net.c | 4 ++-- 1 file 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)); -- 2.39.5