Robert Nagy
4c3dde9d0d
stream: use bit fields for construct/destroy
...
PR-URL: https://github.com/nodejs/node/pull/50408
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-10-28 13:55:34 +00:00
Robert Nagy
8c60add65b
stream: expose stream symbols
...
This is required for streams interop with e.g.
readable-stream. Currently readable-stream helpers
will not work with normal node streams which is
confusing and bad for the ecosystem.
PR-URL: https://github.com/nodejs/node/pull/45671
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-03-24 07:20:18 +00:00
Matteo Collina
355bcbc33d
stream: always delay construct callback by a nextTick
...
Signed-off-by: Matteo Collina <hello@matteocollina.com >
Fixes: https://github.com/nodejs/node/issues/46765
PR-URL: https://github.com/nodejs/node/pull/46818
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-02-26 15:56:20 +00:00
Antoine du Hamel
3a648af0f0
stream: add trailing commas in stream source files
...
PR-URL: https://github.com/nodejs/node/pull/46686
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-02-18 17:53:57 +00:00
SindreXie
efad04910b
stream: refactor use es2020 statement
...
PR-URL: https://github.com/nodejs/node/pull/44533
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
2022-09-13 14:14:48 +00:00
Giacomo Gregoletto
51beb26a5f
stream: pass error on legacy destroy
...
PR-URL: https://github.com/nodejs/node/pull/43519
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-06-28 09:59:24 +01:00
Robert Nagy
58e645de63
stream: remove thenable support
...
Remove support for returning thenables in stream
implementation methods. This is causing more confusion
and issues than it's worth.
Refs: https://github.com/nodejs/node/issues/39535
PR-URL: https://github.com/nodejs/node/pull/40773
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-04-08 11:29:24 +01:00
Robert Nagy
afe460ec9e
stream: allow calling callback before promise
...
Refs: https://github.com/nodejs/node/issues/39535
PR-URL: https://github.com/nodejs/node/pull/40772
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-11-14 15:52:22 +02:00
Robert Nagy
533cafcf7e
stream: duplexify
...
PR-URL: https://github.com/nodejs/node/pull/39519
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-08-03 10:47:10 +02:00
Robert Nagy
f2f6872b5c
stream: cleanup async handling
...
Cleanup async stream method handling.
PR-URL: https://github.com/nodejs/node/pull/39329
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 19:20:01 +02:00
Robert Nagy
bb275ef2a4
stream: unify stream utils
...
Unify stream helps into utils.
PR-URL: https://github.com/nodejs/node/pull/39294
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-07-11 10:40:30 +02:00
Robert Nagy
954217adda
stream: error Duplex write/read if not writable/readable
...
If writable/readable has been explicitly disabled then using
a Duplex as writable/readable should fail.
Fixes: https://github.com/nodejs/node/issues/34374
PR-URL: https://github.com/nodejs/node/pull/34385
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-07-02 22:11:16 +02:00
Robert Nagy
f4609bdf3f
stream: bypass legacy destroy for pipeline and async iteration
...
PR-URL: https://github.com/nodejs/node/pull/38505
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-15 19:43:49 +02:00
Antoine du Hamel
ee9e2a2eb6
lib: revert primordials in a hot path
...
Evidence has shown that use of primordials have sometimes an impact of
performance. This commit reverts the changes who are most likely to be
responsible for performance regression in the HTTP response path.
PR-URL: https://github.com/nodejs/node/pull/38248
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-19 10:23:01 +02:00
Antoine du Hamel
104dac79cc
lib: aggregate errors to avoid error swallowing
...
Uses `AggregateError` if there are more than one error with the message
of the outer error to preserve the current behaviour, or returns the
logical OR comparison of the two parameters.
PR-URL: https://github.com/nodejs/node/pull/37460
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-03-19 12:43:03 +01:00
Antoine du Hamel
419686cdfb
stream: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36346
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-01 15:18:25 +01:00
Michaël Zasso
bf31d3c3b1
tools: enable no-unused-expressions lint rule
...
Fixes: https://github.com/nodejs/node/issues/36246
PR-URL: https://github.com/nodejs/node/pull/36248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-12-07 20:33:45 +01:00
Yash Ladha
4d5444981a
stream: fix duplicate logic in stream destroy
...
Fix duplicate logic in stream destroy as the same logic is being shared
across methods and thus can be encapsulated into a single method.
PR-URL: https://github.com/nodejs/node/pull/35727
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
2020-10-24 12:57:21 +05:30
James M Snell
744a284ccc
stream: support async for stream impl functions
...
PR-URL: https://github.com/nodejs/node/pull/34416
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2020-08-03 17:54:08 -07:00
Robert Nagy
02c4869bee
stream: fix Duplex._construct race
...
Ensures that _construct has finished before invoking
_destroy.
The 'constructed' property was not properly set to false
for both writable and readable state.
Fixes: https://github.com/nodejs/node/issues/34448
PR-URL: https://github.com/nodejs/node/pull/34456
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-07-21 11:00:39 -07:00
Robert Nagy
6213fcee9b
stream: save error in state
...
Useful for future PR's to resolve situations where e.g. finished()
is invoked on an already errored streams.
PR-URL: https://github.com/nodejs/node/pull/34103
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-07-01 18:22:56 +02:00
Robert Nagy
fb8cc72e73
stream: construct
...
Provide a standardized way of asynchronously creating and
initializing resources before performing any work.
Refs: https://github.com/nodejs/node/issues/29314
PR-URL: https://github.com/nodejs/node/pull/29656
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-05-27 10:24:05 +02:00
Robert Nagy
f64c640e66
stream: don't emit end after close
...
Readable stream could emit 'end' after 'close'.
PR-URL: https://github.com/nodejs/node/pull/33076
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-04-28 16:00:44 +02:00
Robert Nagy
f5c11a1a0a
stream: don't emit finish after close
...
Writable stream could emit 'finish' after 'close'.
PR-URL: https://github.com/nodejs/node/pull/32933
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-04-27 16:43:58 +02:00
Robert Nagy
15cc2b652b
stream: update comment to indicate unused API
...
destroy w/ callback was previously used by node
core. This is no longer the case and the
comments should reflect this to avoid confusion.
PR-URL: https://github.com/nodejs/node/pull/32808
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-04-16 09:26:50 +02:00
Robert Nagy
173d044d09
http: align OutgoingMessage and ClientRequest destroy
...
Added .destroyed property to OutgoingMessage and ClientRequest
to align with streams.
Fixed ClientRequest.destroy to dump res and re-use socket in agent
pool aligning it with abort.
PR-URL: https://github.com/nodejs/node/pull/32148
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-10 18:15:01 +01:00
Robert Nagy
311e12b962
stream: fix multiple destroy calls
...
Previously destroy could be called multiple times causing inconsistent
and hard to predict behavior. Furthermore, since the stream _destroy
implementation can only be called once, the behavior of applying destroy
multiple times becomes unclear.
This changes so that only the first destroy() call is executed and any
subsequent calls are noops.
PR-URL: https://github.com/nodejs/node/pull/29197
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-02-29 09:34:43 +01:00
Robert Nagy
b9a7625fdf
stream: removed outdated TODO
...
Was resolved in https://github.com/nodejs/node/commit/e559842188f541b884abff2ffad4d2d3e1b841a6 .
PR-URL: https://github.com/nodejs/node/pull/31701
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-13 21:20:19 +01:00
Robert Nagy
d016b9d708
stream: finished callback for closed streams
...
Previously finished(stream, cb) would not invoke the callback
for streams that have already finished, ended or errored
before being passed to finished(stream, cb).
PR-URL: https://github.com/nodejs/node/pull/31509
Refs: https://github.com/nodejs/node/pull/31508
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-08 23:34:40 +01:00
Robert Nagy
07915db233
stream: re-use legacy destroyer
...
PR-URL: https://github.com/nodejs/node/pull/31316
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2020-01-26 17:53:13 +01:00
Robert Nagy
66f4e4edcb
stream: do not emit 'end' after 'error'
...
Refs: https://github.com/nodejs/node/issues/6083
PR-URL: https://github.com/nodejs/node/pull/31182
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-01-05 22:10:19 -08:00
Robert Nagy
75b30c606c
stream: emit 'error' asynchronously
...
errorOrDestroy emits 'error' synchronously due to
compat reasons. However, it should be possible to
use correct async behaviour for new code.
PR-URL: https://github.com/nodejs/node/pull/29744
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-01-04 16:20:45 -08:00
Robert Nagy
67ed526ab0
stream: error state cleanup
...
Clean up end simplify errored state.
- errorEmitted should be set in the same tick as 'error' is emitted.
- errored should be set as soon as an error occurs.
- errored should exist on Readable as well.
- refactor destroy logic and make it easier to follow.
PR-URL: https://github.com/nodejs/node/pull/30851
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-12-15 15:18:21 +01:00
Robert Nagy
4fa1744e11
stream: add comment about undocumented API
...
PR-URL: https://github.com/nodejs/node/pull/29805
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-10-03 13:57:30 -07:00
Robert Nagy
f663b31cc2
stream: always invoke callback before emitting error
...
Ensure the callback is always invoked before emitting
the error in both sync and async case.
PR-URL: https://github.com/nodejs/node/pull/29293
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-30 10:56:29 -07:00
Richard Lau
95792a7989
Revert "stream: invoke callback before emitting error always"
...
This reverts commit 3de5eae6db .
PR-URL: https://github.com/nodejs/node/pull/29741
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-09-28 06:53:52 -07:00
Robert Nagy
3de5eae6db
stream: invoke callback before emitting error always
...
Ensure the callback is always invoked before emitting
the error in both sync and async case.
PR-URL: https://github.com/nodejs/node/pull/29293
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-09-27 15:45:17 -07:00
Robert Nagy
033037cec9
stream: avoid unecessary nextTick
...
If we are not going to emit 'close' then there is no reason to
schedule it.
PR-URL: https://github.com/nodejs/node/pull/29194
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-08-23 15:23:09 -07:00
Robert Nagy
4a2bd69db9
stream: fix destroy() behavior
...
Ensure errorEmitted is always set. Only emit 'error' once.
PR-URL: https://github.com/nodejs/node/pull/29058
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-08-16 21:33:53 -07:00
Luigi Pinca
49f1bb9b93
stream: ensure writable.destroy() emits error once
...
Prevent the `'error'` event from being emitted multiple times if
`writable.destroy()` is called with an error before the `_destroy()`
callback is called.
Emit the first error, discard all others.
PR-URL: https://github.com/nodejs/node/pull/26057
Fixes: https://github.com/nodejs/node/issues/26015
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-05 23:52:36 +01:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
...
This activates the eslint capitalize comment rule for comments
above 50 characters.
PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-17 17:14:35 +01:00
Ruben Bridgewater
1f85ea979c
tools: capitalize sentences
...
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.
PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-12-10 17:07:18 +01:00
Mathias Buus
f24b070cb7
stream: add auto-destroy mode
...
PR-URL: https://github.com/nodejs/node/pull/22795
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-10-30 15:17:40 +01:00
Brian White
8f6ab9f799
Revert "stream: prevent 'end' to be emitted after 'error'"
...
This reverts commit 0857790656 .
PR-URL: https://github.com/nodejs/node/pull/20449
Fixes: https://github.com/nodejs/node/issues/20334
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-05-07 09:44:26 +02:00
Matteo Collina
0857790656
stream: prevent 'end' to be emitted after 'error'
...
This PR adds _readableState.errorEmitted and add the tracking of it.
Fixes: https://github.com/nodejs/node/issues/6083
PR-URL: https://github.com/nodejs/node/pull/20104
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-20 15:12:22 +02:00
Mathias Buus
a7c25b7d42
stream: always emit error before close
...
PR-URL: https://github.com/nodejs/node/pull/19836
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-04-09 12:30:41 +02:00
Mathias Buus
5e3f51648e
stream: updated streams error handling
...
This improves error handling for streams in a few ways.
1. It ensures that no user defined methods (_read, _write, ...) are run
after .destroy has been called.
2. It introduces an explicit error to tell the user if they are write to
write, etc to the stream after it has been destroyed.
3. It makes streams always emit close as the last thing after they have
been destroyed
4. Changes the default _destroy to not gracefully end streams.
It also updates net, http2, zlib and fs to the new error handling.
PR-URL: https://github.com/nodejs/node/pull/18438
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-03-06 13:31:56 +01:00
Anna Henningsen
03ddd13d8a
net: use _final instead of on('finish')
...
Shutting down the connection is what `_final` is there for.
PR-URL: https://github.com/nodejs/node/pull/18608
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-21 20:42:18 +01:00
Sam Roberts
cf24177aba
net: return this from destroy()
...
PR-URL: https://github.com/nodejs/node/pull/13530
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-14 13:15:51 -07:00
Matteo Collina
ccd3eadbd7
stream: fix destroy(err, cb) regression
...
Fixed a regression that caused the callback passed to destroy()
to not be called if the stream was already destroyed.
This caused a regression on the ws module in CITGM introduced by
https://github.com/nodejs/node/pull/12925 .
PR-URL: https://github.com/nodejs/node/pull/13156
Fixes: https://github.com/websockets/ws/issues/1118
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-24 11:21:03 +02:00