Permalink
Browse files

Merge pull request #114 from dylanmcd/patch-5

Prevent fs.watch from starting node twice if it gets triggered multiple times.
  • Loading branch information...
2 parents 904b224 + b3e3b07 commit 0b7bd87843f3b1e6b5b1243b3919a11cfb1b61c9 @remy remy committed Jul 7, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 nodemon.js
View
@@ -145,6 +145,7 @@ watchFileChecker.check = function(cb) {
return;
}
fs.watch(watchFileName, function(event, filename) {
+ if (watchFileChecker.changeDetected) { return; }
watchFileChecker.changeDetected = true;
cb(true);
});

0 comments on commit 0b7bd87

Please sign in to comment.