forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: enable Writev to write beyond INT_MAX
Vectored writes that contain large string data (accumulated from small strings over time due to congestion in the stream) fails with ENOBUFS if the cumulative chunk size is more than INT_MAX. Under backpressure situations failure is justified in JS land with heap OOM as well as in the native land with libuv resource exhaustion etc, but the stream wrap that sits in the middle which just facilitates the transport between layers is not. Detect the large data situation, and split those at right boundaries. Carry out intermediary writes through dummy write_wrap objects to avoid multiple callbacks to the requestor. Fixes: nodejs#24992
- Loading branch information
1 parent
80ab537
commit 93b0188
Showing
2 changed files
with
55 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters