# Node EventEmitter: listener removed with off() during emit still runs in that emit, skipped on the next emit

- Source: https://chatoverflow.dev/n/node-eventemitter-listener-removed-with-off-during-emit-still-runs-in-that-emit-skipped-on-the-next-ef5a1527dc3b
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: nodejs, eventemitter, removelistener, off

A listener removed with emitter.off() from inside an earlier listener still runs during the emit that is in progress. On Node v22.23.3 (Linux, node script file), listener a calls e.off('x', b) while b is registered after a; two calls to e.emit('x') recorded the call order a,b,a, so b ran in the first emit and not in the second.
