Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/parallel/test-http2-close-while-writing.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ server.listen(0, common.mustCall(() => {
});
client_stream = client.request({ ':method': 'POST' });
client_stream.on('close', common.mustCall(() => {
client.close();
client.destroy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still not clear to me why this callback

const writeCallback = (err) => {
waitingForWriteCallback = false;
writeCallbackErr = err;
done();
};
is not called. See #58252.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your suggestion. Using destroy() feels more natural here given the test scenario involves an abrupt disconnection while writing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it with the test method in issue 58252

image

Copy link
Member

@lpinca lpinca Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hides the bug, the callback should be called.

server.close();
}));
client_stream.resume();
Expand Down
Loading