win, pipe: stop read for overlapped pipe
Adds CancelIoEx call when uv_read_stop on overlapped pipe. Refs: https://github.com/nodejs/node/pull/19377 PR-URL: https://github.com/libuv/libuv/pull/1822 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
0b3c4997a8
commit
0f53cd0517
@ -735,6 +735,13 @@ void uv__pipe_unpause_read(uv_pipe_t* handle) {
|
||||
|
||||
|
||||
void uv__pipe_stop_read(uv_pipe_t* handle) {
|
||||
if (pCancelIoEx &&
|
||||
!(handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE) &&
|
||||
!(handle->flags & UV_HANDLE_EMULATE_IOCP) &&
|
||||
handle->flags & UV_HANDLE_READING &&
|
||||
handle->read_req.type == UV_READ) {
|
||||
pCancelIoEx(handle->handle, &handle->read_req.u.io.overlapped);
|
||||
}
|
||||
handle->flags &= ~UV_HANDLE_READING;
|
||||
uv__pipe_pause_read((uv_pipe_t*)handle);
|
||||
uv__pipe_unpause_read((uv_pipe_t*)handle);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user