Skip to content

zlib: only apply drain listener if given callback#3534

Closed
MylesBorins wants to merge 3 commits intonodejs:masterfrom
MylesBorins:null-check-drain-listener
Closed

zlib: only apply drain listener if given callback#3534
MylesBorins wants to merge 3 commits intonodejs:masterfrom
MylesBorins:null-check-drain-listener

Conversation

@MylesBorins
Copy link
Contributor

When stream.flush() is called without a callback, an empty listener is
being added. Since flush may be called multiple times to push SSE's
down to the client, multiple noop listeners are being added. This in
turn causes the memory leak detected message.

fixes #3529

This commit has been cherry picked from a pr on v0.x-archive
nodejs/node-v0.x-archive#25679

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zlib Issues and PRs related to the zlib subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

event emitter memory leak on flush

9 participants