Skip to content

Commit a39e969

Browse files
committed
Clean up file watchers on project close
1 parent 4863ada commit a39e969

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/server/project.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ namespace ts.server {
311311
this.lsHost.dispose();
312312
this.lsHost = undefined;
313313

314+
// Clean up file watchers waiting for missing files
315+
for (const p of this.missingFilesMap.getKeys()) {
316+
this.missingFilesMap.get(p).close();
317+
this.missingFilesMap.remove(p);
318+
}
319+
this.missingFilesMap = undefined;
320+
314321
// signal language service to release source files acquired from document registry
315322
this.languageService.dispose();
316323
this.languageService = undefined;

0 commit comments

Comments
 (0)