mirror of https://github.com/nodejs/node.git
Reset _eof on socket reuse
parent
5ba0be6166
commit
e1250a3333
|
@ -828,7 +828,7 @@ function connectionListener (socket) {
|
|||
|
||||
// HACK: need way to do this with socket interface
|
||||
if (socket._writeWatcher.firstBucket) {
|
||||
socket._eof = true;
|
||||
socket.__destroyOnDrain = true;
|
||||
} else {
|
||||
socket.destroy();
|
||||
}
|
||||
|
|
|
@ -160,6 +160,7 @@ function initStream (self) {
|
|||
self._readWatcher.socket = self;
|
||||
self._readWatcher.callback = onReadable;
|
||||
self.readable = false;
|
||||
self._eof = false;
|
||||
|
||||
self._writeWatcher = ioWatchers.alloc();
|
||||
self._writeWatcher.socket = self;
|
||||
|
@ -498,7 +499,7 @@ Stream.prototype.destroy = function (exception) {
|
|||
// pool is shared between sockets, so don't need to free it here.
|
||||
var self = this;
|
||||
|
||||
this.readable = this.writable = false;
|
||||
this._eof = this.readable = this.writable = false;
|
||||
|
||||
if (this._writeWatcher) {
|
||||
this._writeWatcher.stop();
|
||||
|
|
Loading…
Reference in New Issue