Skip to content

Commit e14cf21

Browse files
Test for both EAGAIN and EINPROGRESS for AF_UNIX sockets.
Reading the manpage it seems like we only need to test for `EAGAIN` but testing for both seems more prudent since this may be subtly different on more esoteric kernels (SunOS, AIX, BSD, etc). Also explicitly install openSSL3 on macOS. Fixes #1260
1 parent 2a7b8fa commit e14cf21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133

134134
- name: Install dependencies
135135
run: |
136-
brew install openssl [email protected]
136+
brew install openssl@3 [email protected]
137137
brew link [email protected] --force
138138
139139
- name: Build hiredis

net.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ int redisContextConnectUnix(redisContext *c, const char *path, const struct time
668668
sa->sun_family = AF_UNIX;
669669
strncpy(sa->sun_path, path, sizeof(sa->sun_path) - 1);
670670
if (connect(c->fd, (struct sockaddr*)sa, sizeof(*sa)) == -1) {
671-
if (errno == EINPROGRESS && !blocking) {
671+
if ((errno == EAGAIN || errno == EINPROGRESS) && !blocking) {
672672
/* This is ok. */
673673
} else {
674674
if (redisContextWaitReady(c,timeout_msec) != REDIS_OK)

0 commit comments

Comments
 (0)