Skip to content

Commit

Permalink
restore await on on promise contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jan 29, 2021
1 parent c13d07d commit c5f2fe5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/server/plugins/plugins_system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ export class PluginsSystem {
errorMessage: `Setup lifecycle of "${pluginName}" plugin wasn't completed in 30sec. Consider disabling the plugin and re-start.`,
});
} else {
contract = contractOrPromise;
// awaiting non-promise contract to get back in the event queue
contract = await contractOrPromise;
}

contracts.set(pluginName, contract);
Expand Down Expand Up @@ -160,7 +161,8 @@ export class PluginsSystem {
errorMessage: `Start lifecycle of "${pluginName}" plugin wasn't completed in 30sec. Consider disabling the plugin and re-start.`,
});
} else {
contract = contractOrPromise;
// awaiting non-promise contract to get back in the event queue
contract = await contractOrPromise;
}

contracts.set(pluginName, contract);
Expand Down

0 comments on commit c5f2fe5

Please sign in to comment.