Skip to content

Commit 555aeb3

Browse files
authored
test: deflake test-http2-options-max-headers-block-length
The socket can be closed while data is still being written, causing an `ECONNRESET` error to be emitted on the client. Add a listener for it. PR-URL: #57959 Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent bd3f271 commit 555aeb3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-http2-options-max-headers-block-length.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ server.listen(0, common.mustCall(() => {
2222
const client = h2.connect(`http://localhost:${server.address().port}`,
2323
options);
2424

25+
client.on('error', () => {});
26+
2527
const req = client.request();
2628
req.on('response', common.mustNotCall());
2729

0 commit comments

Comments
 (0)