stream: ignore EINVAL for SO_OOBINLINE on OS X
Calling `setsockopt()` on shutdown fds/stdio will result in EINVAL. There is not much problem here as the OOB data can't be sent to already shutdown fds. Just ignore it and go on. PR-URL: https://github.com/libuv/libuv/pull/228 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Bert Belder <bertbelder@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
4e9d6c8321
commit
19d3d506de
@ -394,7 +394,8 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
|
|||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
enable = 1;
|
enable = 1;
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &enable, sizeof(enable)) &&
|
if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &enable, sizeof(enable)) &&
|
||||||
errno != ENOTSOCK) {
|
errno != ENOTSOCK &&
|
||||||
|
errno != EINVAL) {
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user