Skip to content

Commit ebb82aa

Browse files
lpincatargos
authored andcommitted
test: deflake test-http2-client-socket-destroy
The socket can be destroyed by the other peer while data is still being written. Add a listener for the `'error'` event. PR-URL: #58212 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
1 parent f7041b9 commit ebb82aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/parallel/test-http2-client-socket-destroy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const server = h2.createServer();
1515

1616
// We use the lower-level API here
1717
server.on('stream', common.mustCall((stream) => {
18+
stream.on('error', () => {});
1819
stream.on('aborted', common.mustCall());
1920
stream.on('close', common.mustCall());
2021
stream.respond();

0 commit comments

Comments
 (0)