From 0f99b702b07fd3bf10a0345465bd8669cecc12c8 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Mon, 27 May 2024 12:04:25 -0700 Subject: [PATCH] Maybe this is an issue on macOS? --- net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net.c b/net.c index b514bab..e517a84 100644 --- a/net.c +++ b/net.c @@ -668,7 +668,11 @@ int redisContextConnectUnix(redisContext *c, const char *path, const struct time sa->sun_family = AF_UNIX; strncpy(sa->sun_path, path, sizeof(sa->sun_path) - 1); if (connect(c->fd, (struct sockaddr*)sa, sizeof(*sa)) == -1) { +#if defined(__APPLE__) && defined(__MACH__) + if (errno == EINPROGRESS && !blocking) { +#else if ((errno == EAGAIN || errno == EINPROGRESS) && !blocking) { +#endif /* This is ok. */ } else { if (redisContextWaitReady(c,timeout_msec) != REDIS_OK)