(chunk)
| 64 | stream.pause(); |
| 65 | stream.on('error', (err) => this.emit('error', err)); |
| 66 | const ondata = (chunk) => { |
| 67 | if (typeof chunk === 'string' || |
| 68 | stream.readableObjectMode === true) { |
| 69 | // Make sure that no further `data` events will happen. |
| 70 | stream.pause(); |
| 71 | stream.removeListener('data', ondata); |
| 72 | |
| 73 | this.emit('error', new ERR_STREAM_WRAP()); |
| 74 | return; |
| 75 | } |
| 76 | |
| 77 | debug('data', chunk.length); |
| 78 | if (this._handle) |
| 79 | this._handle.readBuffer(chunk); |
| 80 | }; |
| 81 | stream.on('data', ondata); |
| 82 | stream.once('end', () => { |
| 83 | debug('end'); |
no test coverage detected