Clean up file watchers on project close

This commit is contained in:
Andrew Casey
2017-06-20 16:30:33 -07:00
parent 4863ada22c
commit a39e969338

View File

@@ -311,6 +311,13 @@ namespace ts.server {
this.lsHost.dispose();
this.lsHost = undefined;
// Clean up file watchers waiting for missing files
for (const p of this.missingFilesMap.getKeys()) {
this.missingFilesMap.get(p).close();
this.missingFilesMap.remove(p);
}
this.missingFilesMap = undefined;
// signal language service to release source files acquired from document registry
this.languageService.dispose();
this.languageService = undefined;