-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaxListenersExceededWarning
with Stream.pipeline()
#28432
Comments
C:\Users\Himself65\Desktop\github\test>nvm use 12.16.1
Now using node v12.16.1 (64-bit)
C:\Users\Himself65\Desktop\github\test>node bundle.js
(node:20800) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Readable]. Use emitter.setMaxListeners() to incr
ease limit
(node:20800) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Readable]. Use emitter.setMaxListeners() to increa
se limit
C:\Users\Himself65\Desktop\github\test>nvm use 13.10.1
Now using node v13.10.1 (64-bit)
C:\Users\Himself65\Desktop\github\test>node bundle.js
(node:21880) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Readable]. Use emitter.setMaxListeners() to increa
se limit |
I believe this was fixed in d016b9d which is labeled as semver-major and as it looks now won't make it into 12.x. |
Thanks for the update! Trying with |
This comment has been minimized.
This comment has been minimized.
Hm, maybe you are right, it doesn't unregister the event listeners in this case. |
@ehmicky: The docs say:
|
This can partly be fixed. However, it still needs to leave an |
Thanks. If I understand you correctly, this is intended and this issue can be closed? |
Yes, it's an expected behavior. |
v12.4.0
Linux my-laptop 5.0.0-19-generic #20-Ubuntu SMP Wed Jun 19 17:04:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
stream
index.js
:This happens even when
pipeline()
is called afterreadable
has ended and been destroyed. Once a stream has ended, itspipeline()
callback should be called then its listeners should be cleaned up. However this is not the case at the moment:eos()
returns a cleanup function but this function is never called.The text was updated successfully, but these errors were encountered: