Skip to content

Commit a3cbf07

Browse files
committed
fix(vm): stop vm even on verification failing
1 parent 101d43f commit a3cbf07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/backend/src/functions/circuit.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,6 @@ export const verifycontribution = functionsV2.https.onCall(
611611
true
612612
)
613613

614-
// Stop VM instance.
615-
await stopEC2Instance(ec2, vmInstanceId)
616614
} else {
617615
// Upload verification transcript.
618616
/// nb. do not use multi-part upload here due to small file size.
@@ -689,6 +687,9 @@ export const verifycontribution = functionsV2.https.onCall(
689687
})
690688
}
691689

690+
// Stop VM instance
691+
if (isUsingVM) await stopEC2Instance(ec2, vmInstanceId)
692+
692693
// Step (1.A.4.C)
693694
if (!isFinalizing) {
694695
// Step (1.A.4.C.1)

0 commit comments

Comments
 (0)