Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
readline: clean up event listener in onNewListener#13266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
gibfahn commented May 28, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
gibfahn commented May 28, 2017
cc/ @STRML @princejwesley LMK if you're okay with this landing under your name (as it's your code!) |
gibfahn commented May 28, 2017
Moved the check out of the function and handled
|
Once the Readline interface is closed, the 'data' event listener should be removed. Refs: nodejs#9447 (comment)
gibfahn commented May 28, 2017
Changed the test to assert that there is 1 listener until you close, and 0 listeners afterwards. Not sure if that's the intended behaviour. Also not sure whether this would be |
Once the Readline interface is closed, the 'data' event listener should be removed. PR-URL: #13266 Ref: #9447 (comment) Reviewed-By: James M Snell <[email protected]>
jasnell commented Jun 1, 2017
Landed in 7d53aba |
Once the Readline interface is closed, the 'data' event listener should be removed. PR-URL: #13266 Ref: #9447 (comment) Reviewed-By: James M Snell <[email protected]>
addaleax commented Jun 8, 2017
jasnell commented Jun 8, 2017
I'm good with reverting but it would definitely be good to understand why it breaks things because the change is obstensibly correct ... There should not be any more data events after the close event, and there shouldn't be reason to keep the listener there. Preferably the reason for the break can be fixed so that this commit can be reapplied. |
This reverts commit 81ddeb9. Ref: nodejs#13266
gibfahn commented Jun 8, 2017
For anyone reading this issue (possibly in the distant future 🛰 ), @addaleax has since answered this in #13560 (comment):
|
This reverts commit 81ddeb9. Ref: #13266 PR-URL: #13560 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This reverts commit 81ddeb9. Ref: #13266 PR-URL: #13560 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins commented Jul 17, 2017
I'm marking this as dont-land as it appears to be reverted. Let me know if this is a mistake |
If this is a bug, then let's just fix it.
Refs: #9447 (comment)
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
readline