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) {
|
CryptoStream.prototype.destroySoon = function(err) {
|
||||||
return this.end();
|
if (this.writable) {
|
||||||
|
this.end();
|
||||||
|
} else {
|
||||||
|
this.destroy();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user