floatdrop / gulp-plumber

Fixing Node pipes
MIT License
806 stars 32 forks source link

Changes stream behavior #46

Closed iliakan closed 8 years ago

iliakan commented 8 years ago

Observe this:

var vfs = require('vinyl-fs');
var plumber = require('gulp-plumber');

var stream = vfs.src(__filename)
  .pipe(plumber())
  .pipe(vfs.dest('/tmp'))
  .on('data', function() {
    console.log("Never happens")
  });

The on('data') on the last stream never happens. But it should.

iliakan commented 8 years ago

Tracked the problem down to https://github.com/nodejs/node/issues/1041.

The problem is in unpipe of the sink stream that happens because of assigning once('readable') handler by plumber. It stops the flow.

floatdrop commented 8 years ago

Hi! Thanks for investigation, I'm honestly do not remeber, why readable is used in this place. It will be removed in next version.

iliakan commented 8 years ago

@floatdrop the possible reason for it in issues: https://github.com/floatdrop/gulp-plumber/issues/7#issuecomment-32085192

Maybe remove it now if not needed? :)

floatdrop commented 8 years ago

@iliakan removed in 1.1.0 – tests are still green, so there should be no problems now.