Merge pull request #2535 from Microsoft/disposeFileWatcher

Fix: File watchers not being disposed in -watch mode
This commit is contained in:
Anders Hejlsberg 2015-03-28 07:19:03 -07:00
commit 485b5a140b

View File

@ -276,6 +276,7 @@ module ts {
// If a source file changes, mark it as unwatched and start the recompilation timer
function sourceFileChanged(sourceFile: SourceFile) {
sourceFile.fileWatcher.close();
sourceFile.fileWatcher = undefined;
startTimer();
}