electron/shell
trop[bot] e5237eb2ce
fix: always terminate active Node Streams (#43072)
`.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>
2024-07-27 14:46:47 -05:00
..
app chore: fixup gn check when enable_pdf_viewer is false (#41997) 2024-05-03 09:10:36 -05:00
browser fix: always terminate active Node Streams (#43072) 2024-07-27 14:46:47 -05:00
common chore: bump node to v20.15.0 (30-x-y) (#42613) 2024-06-27 15:58:45 +02:00
renderer fix: fetch-dependent interfaces in Web Workers (#42596) 2024-06-20 20:27:35 +02:00
services/node fix: utilityProcess exit codes (#42395) 2024-06-25 19:01:18 +02:00
utility refactor: run Windows SelectFileDialog out of process (#42826) 2024-07-10 15:35:17 +02:00