Fix events remove listener emission by Han5991 · Pull Request #60137 · nodejs/node
added
events
labels
Han5991
marked this pull request as ready for review
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up.
avivkeller
added
the
author ready
label
When the last listener is removed and _eventsCount becomes 0, the removeListener event was not being emitted because the check was inside the else block. This moves the removeListener emission outside the conditional to ensure it always fires when a listener is removed.
RafaelGSS
added
request-ci
and removed commit-queue-failed
labels
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Han5991
deleted the
fix-events-remove-listener-emission
branch
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request
Adds test coverage for the removeListener event being emitted when a once() listener is automatically removed after execution. This verifies that streams and other EventEmitters correctly emit removeListener events when once() wrappers clean up. PR-URL: #60137 Fixes: #59977 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>