diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-10-03 20:53:58 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-05 17:43:21 -0700 |
commit | f58e8eb103ff30876198946a4a9c1280b987c1fb (patch) | |
tree | 07c7004c14d808a3a130a3c79745eb3244efb4ef /doc | |
parent | 0b495a899bdf9a26b25a6e31177512531c841e0e (diff) | |
download | android-node-v8-f58e8eb103ff30876198946a4a9c1280b987c1fb.tar.gz android-node-v8-f58e8eb103ff30876198946a4a9c1280b987c1fb.tar.bz2 android-node-v8-f58e8eb103ff30876198946a4a9c1280b987c1fb.zip |
stream: do not deadlock duplexpair
If nothing is buffered then _read will not be called and the
callback will not be invoked, effectivly deadlocking.
Fixes: https://github.com/nodejs/node/issues/29758
PR-URL: https://github.com/nodejs/node/pull/29836
Refs: https://github.com/nodejs/node/pull/29649
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/stream.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index c6b0e3d551..ca62df8169 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2063,7 +2063,9 @@ when `_read()` is called again after it has stopped should it resume pushing additional data onto the queue. Once the `readable._read()` method has been called, it will not be called again -until the [`readable.push()`][stream-push] method is called. +until more data is pushed through the [`readable.push()`][stream-push] method. +Empty data such as empty buffers and strings will not cause `readable._read()` +to be called. The `size` argument is advisory. For implementations where a "read" is a single operation that returns data can use the `size` argument to determine how |