Skip to content

Commit 485b5a1

Browse files
committed
Merge pull request #2535 from Microsoft/disposeFileWatcher
Fix: File watchers not being disposed in -watch mode
2 parents 8841fc9 + d15278b commit 485b5a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/tsc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ module ts {
276276

277277
// If a source file changes, mark it as unwatched and start the recompilation timer
278278
function sourceFileChanged(sourceFile: SourceFile) {
279+
sourceFile.fileWatcher.close();
279280
sourceFile.fileWatcher = undefined;
280281
startTimer();
281282
}

0 commit comments

Comments
 (0)