Commit Graph

59 Commits

Author SHA1 Message Date
Robert Nagy
ab895bd587 stream: fix pipe deadlock when starting with needDrain
Fixes: https://github.com/nodejs/node/issues/36544

PR-URL: https://github.com/nodejs/node/pull/36563
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-12-20 10:27:35 +01:00
Benjamin Gruenbaum
040a27ae5f stream: support abortsignal in constructor
PR-URL: https://github.com/nodejs/node/pull/36431
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-12-10 23:39:18 +02:00
Benjamin Gruenbaum
5bd1eecfa9 stream: support abort signal
PR-URL: https://github.com/nodejs/node/pull/36061
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2020-12-07 16:08:31 +00:00
Robert Nagy
dd0f8f18c2 stream: writableNeedDrain
Don't write to a stream which already has a full buffer.

Fixes: https://github.com/nodejs/node/issues/35341

PR-URL: https://github.com/nodejs/node/pull/35348
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-11-10 10:44:16 +01:00
Robert Nagy
1d8ecd8cfe
stream: async iterator stop read if destroyed
Fixes some compatibility issues where it is expected
that for await stops reading when the stream is
destroyed.

Refs: https://github.com/nodejs/node/pull/34887

PR-URL: https://github.com/nodejs/node/pull/35640
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-10-15 15:46:40 -04:00
Michaël Zasso
a073f532da lib: use Number.parseInt from primordials
PR-URL: https://github.com/nodejs/node/pull/35499
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2020-10-07 13:44:20 +00:00
Robert Nagy
6be80e1893 stream: fix legacy pipe error handling
Fixes: https://github.com/nodejs/node/issues/35237

PR-URL: https://github.com/nodejs/node/pull/35257
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-09-23 04:33:05 -07:00
Robert Nagy
2b9003b165 stream: don't destroy on async iterator success
Destroying on async iterator completion ignores autoDestroy.

PR-URL: https://github.com/nodejs/node/pull/35122
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-09-21 21:38:49 +00:00
Matteo Collina
9c62e0e384 stream: move to internal/streams
Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.

See: https://github.com/nodejs/readable-stream/issues/348

PR-URL: https://github.com/nodejs/node/pull/35239
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2020-09-21 08:23:06 +00:00