net: fix crash if POLLHUP is received
If the `onread` socket option is used and a `POLLHUP` event is received, libuv returns `UV_EOF` along with a `NULL` buffer in the read callback, causing the crash. Deal with this case. Fixes: https://github.com/nodejs/node/issues/31823 PR-URL: https://github.com/nodejs/node/pull/32590 Reviewed-By:Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
d3af1fe9
Please register or sign in to comment