-
-
Notifications
You must be signed in to change notification settings - Fork 421
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 watcher is never closed #359
Comments
I experience the same issue. To me, this issue should fixed asap. |
While I get your use case, you should not run production server with Still any PR to fix fs.watch is much appreciated as this might also affect any dev env (for which |
Thanks, I'm trying. i18n.configure({
locales: ['some','locales'],
directory: '/some/path',
defaultLocale: 'someLocale',
cookie: null,
autoReload: false,
updateFiles: false,
register: {}
}); So fs.writeFile('/local/file.json', JSON.stringify(translations), () => {
res.redirect('/some/url')
}) And I directly see the change applied on the frontend... |
What I mean is that only by writing the i18n file, it's automatically reloaded, even with
|
@vincentwinkel i18n is reading files
but either way - this issue is about properly closing fs.watch as @matthieusieben described earlier |
Any updates ? :) |
When the
autoReload
option is set, anfs.FSWatcher
is created by the call tofs.watch(...)
.This watcher prevents the process to exit properly.
Moreover, if the configure option is called more than once, several watchers are created, causing a memory leak.
This watcher should:
beforeExit
event is emitted.The text was updated successfully, but these errors were encountered: