1 module.exports = function(stream) {
2 if (stream.readable && typeof stream.resume === 'function') {
3 var state = stream._readableState;
4 if (!state || state.pipesCount === 0) {
5 // Either a classic stream or streams2 that's not piped to another destination
9 console.error("Got error: " + err);
10 // If we can't, it's not worth dying over