diff --git a/src/unix/stream.c b/src/unix/stream.c index 370894bf..76da0618 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -1127,7 +1127,7 @@ static void uv__read(uv_stream_t* stream) { if (is_ipc) { err = uv__stream_recv_cmsg(stream, &msg); if (err != 0) { - stream->read_cb(stream, err, NULL); + stream->read_cb(stream, err, &buf); return; } } diff --git a/src/win/pipe.c b/src/win/pipe.c index b832a28c..13feba5d 100644 --- a/src/win/pipe.c +++ b/src/win/pipe.c @@ -1347,7 +1347,7 @@ static void uv_pipe_read_eof(uv_loop_t* loop, uv_pipe_t* handle, handle->flags &= ~UV_HANDLE_READABLE; uv_read_stop((uv_stream_t*) handle); - handle->read_cb((uv_stream_t*) handle, UV_EOF, &uv_null_buf_); + handle->read_cb((uv_stream_t*) handle, UV_EOF, &buf); } @@ -1505,7 +1505,7 @@ void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle, break; } } else { - uv_pipe_read_error_or_eof(loop, handle, GetLastError(), uv_null_buf_); + uv_pipe_read_error_or_eof(loop, handle, GetLastError(), buf); break; } }