Browse Source

Automatically close FSWatcher on error

Closes #3250
v0.8.7-release
Bert Belder 13 years ago
parent
commit
d8351a2ef4
  1. 1
      lib/fs.js

1
lib/fs.js

@ -659,6 +659,7 @@ function FSWatcher() {
this._handle.onchange = function(status, event, filename) {
if (status) {
self._handle.close();
self.emit('error', errnoException(errno, 'watch'));
} else {
self.emit('change', event, filename);

Loading…
Cancel
Save