-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.netIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
A continuation of https://github.com/nodejs/node/pull/31806/files#r382938926.
On the following platforms the handle.onread is invoked again after UV_EOF unless the handle is handle.close():ed in the same tick as UV_EOF occurs.
- win10-COMPILED_BY-vs2019
- win2012r2-COMPILED_BY-vs2019-x86
https://github.com/nodejs/node/blob/master/lib/internal/stream_base_commons.js#L163
https://github.com/nodejs/node/blob/master/lib/net.js#L242
The workaround in #31806 is to call handle.readStop() after UV_EOF which seems to resolve the issue.
We didn't notice this previously since handle.onread is assigned a noop and/or handle.close is called, inside Socket._destroy which in turn was invoked synchronously with 'end'.
I have a VM where this is easily reproducible.
bricss
Metadata
Metadata
Assignees
Labels
libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.netIssues and PRs related to the net subsystem.Issues and PRs related to the net subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.