unix: fix POLLIN assertion on server read

Certain systems like z/OS have more than one bit turned
on for POLLIN events. (e.g. #define POLLIN 0x03).
Asserting that all bits are turned on would be invalid.
Instead, assert that *any* of those bits are turned on.

PR-URL: https://github.com/libuv/libuv/pull/1390
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
John Barboza 2017-06-27 02:41:45 -04:00 committed by Ben Noordhuis
parent 11563e179f
commit 391e818c4a

View File

@ -514,7 +514,7 @@ void uv__server_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
int err;
stream = container_of(w, uv_stream_t, io_watcher);
assert(events == POLLIN);
assert(events & POLLIN);
assert(stream->accepted_fd == -1);
assert(!(stream->flags & UV_CLOSING));