From ecc9291c7b61522bba24d8c525eeac4cee2310c0 Mon Sep 17 00:00:00 2001 From: Murat Corlu Date: Mon, 16 Sep 2019 08:42:01 +0200 Subject: [PATCH] fix: Empty event loops with multiple middlewares cause timeouts --- src/lambda-wrapper.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lambda-wrapper.js b/src/lambda-wrapper.js index c6e8e7e..677306d 100644 --- a/src/lambda-wrapper.js +++ b/src/lambda-wrapper.js @@ -3,6 +3,8 @@ const { Request } = require('./request'); exports.use = (...handlers) => { return (event, context, callback) => { + context.callbackWaitsForEmptyEventLoop = false; + const request = new Request(event); const response = new Response(request, callback); request.res = response;