Skip to content

Commit

Permalink
fix: replaced writeHead with socket.write
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Nov 22, 2022
1 parent 85d1e1b commit 19684f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-domain-multi.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const server = http.createServer((req, res) => {

b.on('error', common.mustCall((er) => {
if (res) {
res.writeHead(500);
// Introduce an error on the client by writing unexpected data.
// The client is now expecting a chunk header so any letter will
// have the parser throw an error.
res.socket.write('H');
res.end('An error occurred');
}
// res.writeHead(500), res.destroy, etc.
Expand Down

0 comments on commit 19684f8

Please sign in to comment.