-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
fs: fs.watchFile() should not emit 'stop' event synchronously #8421
Labels
fs
Issues and PRs related to the fs subsystem / file system.
Comments
Wrapping https://github.com/nodejs/node/blob/master/lib/fs.js#L1466 in a process.nextTick seems to pass all tests, including the one you put here. I'll make a PR if that makes sense |
@bnoordhuis would the proposed solution work in your case? |
Can you file a pull request? If it's not a proper solution, the reviewer will tell you. |
3 tasks
claudiorodriguez
added a commit
to claudiorodriguez/node
that referenced
this issue
Sep 19, 2016
Emits 'stop' event for fs.watchFile on process.nextTick to fix 'maximum call stack size exceeded' error when `stop` is called synchronously after listener is attached. Fixes: nodejs#8421
jasnell
pushed a commit
that referenced
this issue
Sep 29, 2016
Emits 'stop' event for fs.watchFile on process.nextTick to fix 'maximum call stack size exceeded' error when `stop` is called synchronously after listener is attached. PR-URL: #8524 Fixes: #8421 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is bad because
w.on('stop', w.stop); w.stop();
will result in a 'maximum call stack size exceeded' error.The text was updated successfully, but these errors were encountered: