Commit 8b43d3f5 authored by Rich Trott's avatar Rich Trott
Browse files

zlib: do not emit event on *Sync() methods

Asynchronous functions in `zlib` should not emit the close event.

This fixes an issue where asynchronous calls in a for loop could exhaust
memory because the pending event prevents the objects from being garbage
collected.

Fixes: https://github.com/nodejs/node/issues/1668
PR-URL: https://github.com/nodejs/node/pull/5707


Reviewed-By: default avatarjasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: default avatartrevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: default avatarСковорода Никита Андреевич <chalkerx@gmail.com>
parent a53b2ac4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment