From 627c7c401a843c0d2c8418b6d5a40bce98a1e86e Mon Sep 17 00:00:00 2001 From: Tim Hellhake Date: Thu, 4 Mar 2021 22:06:22 +0100 Subject: [PATCH] Remove unused deferred (#2803) --- src/plugin/plugin.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/plugin/plugin.ts b/src/plugin/plugin.ts index 7edb6a7b7..154874c61 100644 --- a/src/plugin/plugin.ts +++ b/src/plugin/plugin.ts @@ -88,8 +88,6 @@ export default class Plugin { private unloadCompletedPromise: Deferred | null = null; - private unloadedRcvdPromise?: Deferred; - private nextId = 0; private requestActionPromises = new Map(); @@ -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; @@ -866,7 +862,6 @@ export default class Plugin { unload(): void { this.restart = false; - this.unloadedRcvdPromise = new Deferred(); this.sendMsg(MessageType.PLUGIN_UNLOAD_REQUEST, {}); }