GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — `events.once` leaks signal listener · Issue #43337 · nodejs/node Closed Labels confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.eventsIssues and PRs related to EventEmitter and the events module.Issues and PRs related to EventEmitter and the events module. DescriptionVersionv18.3.0 PlatformLinux Subsystemevents What steps will reproduce the bug?const { EventEmitter, once } = require("events"); (async () => { const controller = new AbortController(); const ee = new EventEmitter(); setTimeout(() => { controller.abort(); }, 500); while (true) { setTimeout(() => ee.emit("test"), 100); await once(ee, "test", { signal: controller.signal }); console.dir(controller.signal); } })(); How often does it reproduce? Is there a required condition?No response What is the expected behavior?No response What do you see instead?The signal abort listeners do not get removed. Additional informationWhen listeners are added to Lines 1011 to 1013 in b631086
I confirmed that the listeners do get removed correctly when simply passing the listener in directly, however, I'm unsure if this will have any other consequences hinted at by the comment. Activity
MetadataMetadataAssigneesLabelsconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.eventsIssues and PRs related to EventEmitter and the events module.Issues and PRs related to EventEmitter and the events module. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |