Closed
Description
The following should log 'ok' to the console but nothing is logged.
var stream = require('stream');
var pass = new stream.PassThrough();
var writable = new stream.Writable();
pass.pipe(writable); pass.unpipe(writable);
pass.on('data', function(chunk){ console.log(chunk.toString()); });
pass.write('ok');
Of course, commenting the line pass.pipe(writable); pass.unpipe(writable);
fix the problem.
Can you explain me why?