| 948 | { |
| 949 | detachResponseDecompression(); |
| 950 | response.failBodyStream(error); |
| 951 | response.abortBodyStream(); |
| 952 | closeConnection(); |
| 953 | state = State::Idle; |
| 954 | currentRequest = nullptr; |
| 955 | if (onError.isValid()) |
| 956 | { |
| 957 | onError(error); |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | void HttpAsyncClient::onReadableError(Result result) { fail(result); } |
| 962 | void HttpAsyncClient::onWritableError(Result result) { fail(result); } |
| 963 | void HttpAsyncClient::onPipelineError(Result result) { fail(result); } |
| 964 | |
| 965 | void HttpAsyncClient::onReadableEnd() |
| 966 | { |
| 967 | if (state == State::Idle) |
| 968 | { |
| 969 | closeConnection(); |
| 970 | return; |
| 971 | } |
| 972 | if (state == State::StreamingResponse and response.getBodyFramingKind() == HttpBodyFramingKind::CloseDelimited and |
| 973 | response.hasReceivedHeaders()) |
| 974 | { |
nothing calls this directly
no test coverage detected