mirror of https://github.com/nodejs/node.git
Fix socket.end() problem on non-empty queue
parent
0b1214c16b
commit
544877d12e
|
@ -73,7 +73,9 @@ IOWatcher.prototype.ondrain = function () {
|
|||
|
||||
IOWatcher.prototype.onerror = function (errno) {
|
||||
assert(this.socket);
|
||||
this.socket.destroy(errnoException(errno, 'write'));
|
||||
var e = errnoException(errno, 'write');
|
||||
e.message += " fd=" + this.socket.fd;
|
||||
this.socket.destroy(e);
|
||||
};
|
||||
|
||||
|
||||
|
@ -613,7 +615,7 @@ Stream.prototype.end = function (data, encoding) {
|
|||
this._eof = true;
|
||||
|
||||
// If this isn't in the dumpQueue then we shutdown now.
|
||||
if (!this._writeWatcher.next) this._shutdown();
|
||||
if (!this._writeWatcher.firstBucket) this._shutdown();
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue