6322c329bf
`.destroy()` is an important method in the lifecycle of a Node.js Readable stream. It is typically called to reclaim the resources (e.g., close file descriptor). The only situations where calling it manually isn't necessary are when the following events are emitted first: - `end`: natural end of a stream - `error`: stream terminated due to a failure Prior to this commit the ended state was incorrectly tracked together with a pending internal error. It led to situations where the request could get aborted during a read and then get marked as ended (having pending error). With this change we disentangle pending "error" and "destroyed" cases to always properly terminate an active Node.js Readable stream. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> |
||
---|---|---|
.. | ||
asar | ||
cert_verifier_client.cc | ||
cert_verifier_client.h | ||
electron_url_loader_factory.cc | ||
electron_url_loader_factory.h | ||
network_context_service.cc | ||
network_context_service.h | ||
network_context_service_factory.cc | ||
network_context_service_factory.h | ||
node_stream_loader.cc | ||
node_stream_loader.h | ||
proxying_url_loader_factory.cc | ||
proxying_url_loader_factory.h | ||
proxying_websocket.cc | ||
proxying_websocket.h | ||
resolve_host_function.cc | ||
resolve_host_function.h | ||
resolve_proxy_helper.cc | ||
resolve_proxy_helper.h | ||
system_network_context_manager.cc | ||
system_network_context_manager.h | ||
url_pipe_loader.cc | ||
url_pipe_loader.h | ||
web_request_api_interface.h |