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.
Cherry-picked from v1.x (19d3d50)
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
2797aa329e
commit
e28a5d55ba
@ -422,7 +422,8 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
|
||||
#if defined(__APPLE__)
|
||||
enable = 1;
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &enable, sizeof(enable)) &&
|
||||
errno != ENOTSOCK) {
|
||||
errno != ENOTSOCK &&
|
||||
errno != EINVAL) {
|
||||
return uv__set_sys_error(stream->loop, errno);
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user