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: https://github.com/nodejs/node/pull/58212 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
This commit is contained in:
parent
264cad75ce
commit
508cd0f275
@ -15,6 +15,7 @@ const server = h2.createServer();
|
||||
|
||||
// We use the lower-level API here
|
||||
server.on('stream', common.mustCall((stream) => {
|
||||
stream.on('error', () => {});
|
||||
stream.on('aborted', common.mustCall());
|
||||
stream.on('close', common.mustCall());
|
||||
stream.respond();
|
||||
|
Loading…
x
Reference in New Issue
Block a user