* Marks the stream read process as ended. * @param {Error} [err] The stream read error. * @private
(err)
| 251 | * @private |
| 252 | */ |
| 253 | _setReadEnded(err) { |
| 254 | if (!this._readEnded) { |
| 255 | this._readEnded = true; |
| 256 | |
| 257 | if (err) { |
| 258 | // There was an error while reading from the input stream. |
| 259 | // This should be surfaced as a failure |
| 260 | this._rejectCallback(err); |
| 261 | } else if (this._inFlight === 0) { |
| 262 | // Ended signaled and there are no more pending messages. |
| 263 | this._resolveCallback(this._result); |
| 264 | } |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | _setError(index, err) { |
| 269 | this._result.setError(index, err); |
no outgoing calls
no test coverage detected