Skip to content

fs: do not emit 'stop' watch event synchronously

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

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: https://github.com/nodejs/node/issues/8421

Merge request reports

Loading