Skip to content

Commit d15278b

Browse files
committed
Fix: File watchers not being disposed in -watch mode
1 parent 4894fee commit d15278b

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)