Skip to content

🎥 Make videos programmatically with React

kill runtime after response has been written (fixes #2447 )

Jonny Burgerb3913979d11f
diff --git a/packages/lambda/src/functions/index.ts b/packages/lambda/src/functions/index.ts
index 1d43b50085..4c95773520 100644
--- a/packages/lambda/src/functions/index.ts
+++ b/packages/lambda/src/functions/index.ts
@@ -173,6 +173,10 @@ const routine = async (
responseStream.write(JSON.stringify(res));
responseStream.end();
+ } finally {
+ responseStream.on('close', () => {
+ process.exit(0);
+ });
}
};