stream: allow using `.push()`/`.unshift()` during `once('data')` · nodejs/node@d44b05b · GitHub
Skip to content

Commit d44b05b

Browse files
committed
stream: allow using .push()/.unshift() during once('data')
Previously, the `.push()` or `.unshift()` call would just have jumped straight to emitting a `'data'` event, even if there were no listeners, effectively just silently dropping the chunk. PR-URL: #34957 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
1 parent 327d009 commit d44b05b

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

lib/_stream_readable.js

Lines changed: 2 additions & 1 deletion
Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)