Skip to content

Commit

Permalink
fix: Empty event loops with multiple middlewares cause timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
muratcorlu committed Sep 16, 2019
1 parent 3383545 commit ecc9291
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lambda-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ecc9291

Please sign in to comment.