diff --git a/lib/Connection.js b/lib/Connection.js index 9f10dc9..9a64e74 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -66,13 +66,13 @@ function Connection(config) { this._sock = undefined; this._tagcount = 0; this._tmrConn = undefined; + this._tmrKeepalive = undefined; this._tmrAuth = undefined; this._queue = []; this._box = undefined; this._idle = {}; this._parser = undefined; this._curReq = undefined; - this._ending = false; this.delimiter = undefined; this.namespaces = undefined; this.state = 'disconnected'; @@ -89,13 +89,13 @@ Connection.prototype.connect = function() { this._sock = undefined; this._tagcount = 0; this._tmrConn = undefined; + this._tmrKeepalive = undefined; this._tmrAuth = undefined; this._queue = []; this._box = undefined; this._idle = {}; this._parser = undefined; this._curReq = undefined; - this._ending = false; this.delimiter = undefined; this.namespaces = undefined; this.state = 'disconnected'; diff --git a/lib/Parser.js b/lib/Parser.js index 52a877b..407ffd6 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -58,9 +58,8 @@ function Parser(stream, debug) { inherits(Parser, EventEmitter); Parser.prototype.setStream = function(stream) { - if (this._stream) { + if (this._stream) this._stream.removeListener('readable', this._cbReadable); - } if (/^v0\.8\./.test(process.version)) { this._stream = (new ReadableStream()).wrap(stream);