Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
ronag committed Jun 20, 2020
commit 402fc26f0dc3a40a047a725d12f28deb9f7110c0
20 changes: 9 additions & 11 deletions test/parallel/test-http-server-write-end-after-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ function handle(req, res) {
res.write('hello');
res.end();

setImmediate(() => {
// TODO: Known issues. OutgoingMessage does not always invoke callback
// in end. Also streams don't propagate write after end to callback.
setImmediate(common.mustCall(() => {
res.end('world');
process.nextTick(() => {
server.close();
});
// res.end('world', common.mustCall((err) => {
// common.expectsError({
// code: 'ERR_STREAM_WRITE_AFTER_END',
// name: 'Error'
// })(err);
// server.close();
// }));
});
res.write('world', common.mustCall((err) => {
common.expectsError({
code: 'ERR_STREAM_WRITE_AFTER_END',
name: 'Error'
})(err);
server.close();
}));
}));
}

server.listen(0, common.mustCall(() => {
Expand Down