summaryrefslogtreecommitdiff
path: root/doc/api/readline.md
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-09-03 17:39:09 -0400
committercjihrig <cjihrig@gmail.com>2018-09-06 20:11:31 -0400
commit83c1ba3180f4f16e28e4eeba49bed08c8a35befd (patch)
tree7612878d3343e87caf3e111e67ae530862de60a0 /doc/api/readline.md
parented976d76b0cab84eb26618d50541289d3e0687b8 (diff)
downloadandroid-node-v8-83c1ba3180f4f16e28e4eeba49bed08c8a35befd.tar.gz
android-node-v8-83c1ba3180f4f16e28e4eeba49bed08c8a35befd.tar.bz2
android-node-v8-83c1ba3180f4f16e28e4eeba49bed08c8a35befd.zip
doc: add warning to readline's close() method
When close() is called on a readline instance, it is possible that data is already buffered, and will trigger 'line' events. This commit adds a warning to the corresponding docs. Note that a similar warning already exists for the pause() method. PR-URL: https://github.com/nodejs/node/pull/22679 Fixes: https://github.com/nodejs/node/issues/22615 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/readline.md')
-rw-r--r--doc/api/readline.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md
index 8efc3d6e41..ccc9ee92fe 100644
--- a/doc/api/readline.md
+++ b/doc/api/readline.md
@@ -195,6 +195,9 @@ The `rl.close()` method closes the `readline.Interface` instance and
relinquishes control over the `input` and `output` streams. When called,
the `'close'` event will be emitted.
+Calling `rl.close()` does not immediately stop other events (including `'line'`)
+from being emitted by the `readline.Interface` instance.
+
### rl.pause()
<!-- YAML
added: v0.3.4