mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
CryptoStream.prototype.destroySoon shouldn't die if not writable
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user