assert NULL read_cb in unix only

This commit is contained in:
Edy Silva 2026-03-10 21:09:44 -03:00
parent 12ebe23eb2
commit 877bf9ee90

View File

@ -928,8 +928,13 @@ int uv_read_start(uv_stream_t* stream,
if (stream->flags & UV_HANDLE_CLOSING)
return UV_EINVAL;
if (stream->flags & UV_HANDLE_READING)
#ifdef _WIN32
if (stream->flags & UV_HANDLE_READING)
return UV_EALREADY;
#else
if (stream->read_cb != NULL)
return UV_EALREADY;
#endif
if (!(stream->flags & UV_HANDLE_READABLE))
return UV_ENOTCONN;