Skip to content

Commit

Permalink
catch errors on closing
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Apr 26, 2020
1 parent 9efbb97 commit da8c244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DirectoryWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ DirectoryWatcher.prototype.getTimes = function() {

DirectoryWatcher.prototype.close = function() {
this.initialScan = false;
this.watcher.close();
this.watcher.close().catch(this.onWatcherError.bind(this));
if(this.nestedWatching) {
Object.keys(this.directories).forEach(function(dir) {
this.directories[dir].close();
Expand Down

0 comments on commit da8c244

Please sign in to comment.