Skip to content

Commit

Permalink
Fix protection
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Jul 9, 2024
1 parent fb5553e commit 2ede5c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/upgrader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,13 @@ export abstract class Upgrader {

private async protectedDeployNewImplementation (contract: string) {
await this.deploySemaphore.acquire();
let result: ContractToUpgrade | null = null;
try {
return this.deployNewImplementation(contract);
result = await this.deployNewImplementation(contract);
} finally {
this.deploySemaphore.release();
}
return result;
}

private async deployNewImplementation (contract: string) {
Expand Down

0 comments on commit 2ede5c8

Please sign in to comment.