-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: redisContextConnectUnix has bug. #1260
Comments
michael-grunder
added a commit
that referenced
this issue
May 27, 2024
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). Fixes #1260
michael-grunder
added a commit
to michael-grunder/hiredis
that referenced
this issue
May 28, 2024
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 redis#1260
michael-grunder
added a commit
that referenced
this issue
Aug 20, 2024
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). Fixes #1260
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
V1.2.0
`
int redisContextConnectUnix(redisContext *c, const char *path, const struct timeval *timeout) {
#ifndef _WIN32
int blocking = (c->flags & REDIS_BLOCK);
struct sockaddr_un *sa;
long timeout_msec = -1;
#else
/* We currently do not support Unix sockets for Windows. /
/ TODO(m): https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ /
errno = EPROTONOSUPPORT;
return REDIS_ERR;
#endif / _WIN32 */
oom:
__redisSetError(c, REDIS_ERR_OOM, "Out of memory");
return REDIS_ERR;
}
`
///////////////////////////////////////////(man connect )///////////////////////////////////////////////////////////
EAGAIN For nonblocking UNIX domain sockets, the socket is nonblocking,
and the connection cannot be completed immediately. For other
socket families, there are insufficient entries in the routing
cache.
///////////////////////////////////////////////////(conclusion)///////////////////////////////////////////////////////////////////
For unix socket ,connect with non-blocking will return EAGAIN,not EINPROGRESS
The text was updated successfully, but these errors were encountered: