mirror of https://github.com/nodejs/node.git
CryptoStream.prototype.destroySoon shouldn't die if not writable
parent
161f7aacf7
commit
62f06fb885
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue