streams2: Still emit error if there was a write() cb

This commit is contained in:
isaacs
2012-12-14 10:49:16 -08:00
parent 19ecc3a4a6
commit 3751c0fe40

View File

@@ -175,8 +175,10 @@ function onwrite(stream, er) {
});
else
cb(er);
} else
stream.emit('error', er);
}
// backwards compatibility. still emit if there was a cb.
stream.emit('error', er);
return;
}
state.length -= l;