Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: 0c2960ef4ab8
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: 545807918ee7
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Aug 19, 2013

  1. stream: Throw on 'error' if listeners removed

    In this situation:
    
        writable.on('error', handler);
        readable.pipe(writable);
        writable.removeListener('error', handler);
        writable.emit('error', new Error('boom'));
    
    there is actually no error handler, but it doesn't throw, because of the
    fix for stream.once('error', handler), in 23d92ec.
    
    Note that simply reverting that change is not valid either, because
    otherwise this will emit twice, being handled the first time, and then
    throwing the second:
    
        writable.once('error', handler);
        readable.pipe(writable);
        writable.emit('error', new Error('boom'));
    
    Fix this with a horrible hack to make the stream pipe onerror handler
    added before any other userland handlers, so that our handler is not
    affected by adding or removing any userland handlers.
    
    Closes #6007.
    isaacs committed Aug 19, 2013
    2
    Copy the full SHA
    5458079 View commit details
    Browse the repository at this point in the history