This commit is contained in:
Juan José 2026-03-31 09:18:41 +03:00 committed by GitHub
commit 5cd89e480e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1264,12 +1264,15 @@ static void uv__stream_connect(uv_stream_t* stream) {
} else {
/* Normal situation: we need to get the socket error from the kernel. */
assert(uv__stream_fd(stream) >= 0);
getsockopt(uv__stream_fd(stream),
SOL_SOCKET,
SO_ERROR,
&error,
&errorsize);
error = UV__ERR(error);
if (getsockopt(uv__stream_fd(stream),
SOL_SOCKET,
SO_ERROR,
&error,
&errorsize)) {
error = UV__ERR(errno);
} else {
error = UV__ERR(error);
}
}
if (error == UV__ERR(EINPROGRESS))