Skip to content

Commit

Permalink
Don't destroy() after end()
Browse files Browse the repository at this point in the history
  • Loading branch information
kanongil authored and Marsup committed Mar 13, 2024
1 parent b5e8d33 commit 591258a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,9 @@ exports = module.exports = internals.Core = class {
if (socket.readable) {
socket.end(internals.badRequestResponse);
}

socket.destroy(err);
else {
socket.destroy(err);
}
});
return;
}
Expand All @@ -581,7 +582,6 @@ exports = module.exports = internals.Core = class {
}
else {
socket.end(internals.badRequestResponse);
socket.destroy(err);
}
}
else {
Expand Down

0 comments on commit 591258a

Please sign in to comment.