nodejs / nodejs/node

stream: end(callback) does not propagate write after end to callback

Open
#33,684 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

confirmed-bug http stream
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

w.end();
w.end('asd', (err) => {
  assert.strictEqual(err.code, 'ERR_STREAM_WRITE_AFTER_END'); // Fails
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided w.end() example and trace the stream end callback handling. Done means the callback receives an error with code ERR_STREAM_WRITE_AFTER_END, backed by a regression test for the shown sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.