Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: typo from merge
  • Loading branch information
ronag committed Sep 23, 2019
commit efa5cbb541882d7a6d1fbdd9f259d21cd886dfd2
5 changes: 3 additions & 2 deletions lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
// client
function responseKeepAlive(req) {
const socket = req.socket;
const res = req.res;

req.emit('close');
if (res) {
Expand Down Expand Up @@ -644,7 +645,7 @@ function responseOnEnd() {
// Run in next tick so any pending handlers
// have a chance to run first and perform any
// modifications.
process.nextTick(responseKeepAlive, res, req);
process.nextTick(responseKeepAlive, req);
}
}

Expand All @@ -655,7 +656,7 @@ function requestOnPrefinish() {
// Run in next tick so any pending handlers
// have a chance to run first and perform any
// modifications.
process.nextTick(responseKeepAlive, res, req);
process.nextTick(responseKeepAlive, req);
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to move the close emitters here to ensure they are emitted after all userland 'end' handlers have completed.

}

Expand Down