Skip to content

Commit c9385c0

Browse files
authored
Defer marking request as completed until response is complete
Marking the request as complete before the response is finished causes issues if the request is still being read to create the response. Fixes CodeGenieApp#693
1 parent 5944638 commit c9385c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transport.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ async function forwardRequestToNodeServer ({
160160
log.debug('SERVERLESS_EXPRESS:FORWARD_REQUEST_TO_NODE_SERVER:REQUEST_VALUES', { requestValues })
161161
const { request, response } = await getRequestResponse(requestValues)
162162
await framework.sendRequest({ app, request, response })
163-
markHttpRequestAsCompleted(request)
164163
await waitForStreamComplete(response)
164+
markHttpRequestAsCompleted(request)
165165
log.debug('SERVERLESS_EXPRESS:FORWARD_REQUEST_TO_NODE_SERVER:RESPONSE', { response })
166166
forwardResponse({
167167
binarySettings,

0 commit comments

Comments
 (0)