@ -170,7 +170,11 @@ CryptoStream.prototype.end = function(d) {
CryptoStream.prototype.destroySoon = function(err) {
return this.end();
if (this.writable) {
this.end();
} else {
this.destroy();
}
};