mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Clean up file watchers on project close
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user