mirror of https://github.com/nodejs/node.git
Avoid missing ref error in WriteStream.prototype.destroy().
parent
71651bf8b2
commit
75f922c863
|
@ -946,7 +946,9 @@ WriteStream.prototype.forceClose = function (cb) {
|
||||||
|
|
||||||
|
|
||||||
WriteStream.prototype.destroy = function (cb) {
|
WriteStream.prototype.destroy = function (cb) {
|
||||||
|
var self = this;
|
||||||
this.writeable = false;
|
this.writeable = false;
|
||||||
|
|
||||||
fs.close(self.fd, function(err) {
|
fs.close(self.fd, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
if (cb) {
|
if (cb) {
|
||||||
|
|
Loading…
Reference in New Issue