Use public `readableObjectMode` option to construct `Transform`
instead of accessing private `_readableState.objectMode`.
Partially addresses https://github.com/iojs/io.js/issues/445.
PR-URL: https://github.com/iojs/io.js/pull/270
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
};
function Client(agent, socket) {
- Transform.call(this);
- this._readableState.objectMode = true;
+ Transform.call(this, {
+ readableObjectMode: true
+ });
this.agent = agent;
this.binding = this.agent.binding;