From 49974c9359ad6b58cea15106cf6511bdb31d31a9 Mon Sep 17 00:00:00 2001 From: Mark Nunberg Date: Sun, 4 Mar 2018 18:17:16 +0200 Subject: Call connect(2) again for non-blocking connect This retrieves the actual error which occurred, as getsockopt is not always reliable in this regard. --- hiredis.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hiredis.h') diff --git a/hiredis.h b/hiredis.h index bd53e7e..1b0d5e6 100644 --- a/hiredis.h +++ b/hiredis.h @@ -134,6 +134,9 @@ typedef struct redisContext { char *path; } unix_sock; + /* For non-blocking connect */ + struct sockadr *saddr; + size_t addrlen; } redisContext; redisContext *redisConnect(const char *ip, int port); -- cgit v1.2.3