Skip to content

Commit 0721653

Browse files
fix: replaced writeHead with socket.write
1 parent ba88877 commit 0721653

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-domain-multi.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ const server = http.createServer((req, res) => {
4646

4747
b.on('error', common.mustCall((er) => {
4848
if (res) {
49-
res.writeHead(500);
49+
// Introduce an error on the client by writing unexpected data.
50+
// The client is now expecting a chunk header so any letter will
51+
// have the parser throw an error.
52+
res.socket.write('H');
5053
res.end('An error occurred');
5154
}
5255
// res.writeHead(500), res.destroy, etc.

0 commit comments

Comments
 (0)