Skip to content

Commit

Permalink
fix: dispose logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaaaash committed Jan 23, 2025
1 parent a958b17 commit c73839c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { WatcherProcessLogger } from './watch-process-log';

const watcherPlaceHolder = {
disposable: {
dispose: () => { },
dispose: () => {},
},
handlers: [],
};
Expand Down Expand Up @@ -138,6 +138,7 @@ export class WatcherHostServiceImpl implements IWatcherHostService {
Disposable.create(() => {
this.unrecursiveFileSystemWatcher!.unwatchFileChanges(uri.toString());
this.watchedDirs.delete(uri.toString());
this.WATCHER_HANDLERS.delete(watcherId);
}),
);

Expand All @@ -153,6 +154,7 @@ export class WatcherHostServiceImpl implements IWatcherHostService {
Disposable.create(() => {
this.recursiveFileSystemWatcher!.unwatchFileChanges(uri.toString());
this.watchedDirs.delete(uri.toString());
this.WATCHER_HANDLERS.delete(watcherId);
}),
);
} catch (error) {
Expand Down

0 comments on commit c73839c

Please sign in to comment.