Skip to content

Commit

Permalink
Remove unused deferred (#2803)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hellhake authored Mar 4, 2021
1 parent 38a02e8 commit 627c7c4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ export default class Plugin {

private unloadCompletedPromise: Deferred<void, void> | null = null;

private unloadedRcvdPromise?: Deferred<void, void>;

private nextId = 0;

private requestActionPromises = new Map();
Expand Down Expand Up @@ -406,11 +404,9 @@ export default class Plugin {
case MessageType.PLUGIN_UNLOAD_RESPONSE:
this.shutdown();
this.pluginServer!.unregisterPlugin(msg.data.pluginId);
if (this.unloadedRcvdPromise) {
if (this.unloadCompletedPromise) {
this.unloadCompletedPromise.resolve();
this.unloadCompletedPromise = null;
}
if (this.unloadCompletedPromise) {
this.unloadCompletedPromise.resolve();
this.unloadCompletedPromise = null;
}
return;

Expand Down Expand Up @@ -866,7 +862,6 @@ export default class Plugin {

unload(): void {
this.restart = false;
this.unloadedRcvdPromise = new Deferred();
this.sendMsg(MessageType.PLUGIN_UNLOAD_REQUEST, {});
}

Expand Down

0 comments on commit 627c7c4

Please sign in to comment.