| 9174 | } |
| 9175 | __name(onResponse, "onResponse"); |
| 9176 | function onEnd() { |
| 9177 | const stream = this; |
| 9178 | const state = stream[kRequestStreamState]; |
| 9179 | const { request } = state; |
| 9180 | stream.off("end", onEnd); |
| 9181 | if (state.responseReceived) { |
| 9182 | if (!request.aborted && !request.completed) { |
| 9183 | state.pendingEnd = true; |
| 9184 | } |
| 9185 | } else { |
| 9186 | state.abort(new InformationalError("HTTP/2: stream half-closed (remote)"), true); |
| 9187 | } |
| 9188 | } |
| 9189 | __name(onEnd, "onEnd"); |
| 9190 | function onError(err) { |
| 9191 | const stream = this; |