From d15278bb864ebcec685f3e7d068941cdf70260f2 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 27 Mar 2015 15:53:01 -0700 Subject: [PATCH] Fix: File watchers not being disposed in -watch mode --- src/compiler/tsc.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index a0d21106f43..0cbeff8204a 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -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(); }