mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
CryptoStream.prototype.destroySoon shouldn't die if not writable
This commit is contained in:
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
Block a user