Also called to just clean up the mess. */
| 557 | |
| 558 | /* Also called to just clean up the mess. */ |
| 559 | void ClientNetworkContentSocketHandler::OnFailure() |
| 560 | { |
| 561 | this->http_response.clear(); |
| 562 | this->http_response.shrink_to_fit(); |
| 563 | this->http_response_index = -2; |
| 564 | |
| 565 | if (this->cur_file.has_value()) { |
| 566 | this->OnDownloadProgress(*this->cur_info, -1); |
| 567 | |
| 568 | this->cur_file.reset(); |
| 569 | } |
| 570 | |
| 571 | /* If we fail, download the rest via the 'old' system. */ |
| 572 | if (!this->is_cancelled) { |
| 573 | uint files, bytes; |
| 574 | |
| 575 | this->DownloadSelectedContent(files, bytes, true); |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | void ClientNetworkContentSocketHandler::OnReceiveData(std::unique_ptr<char[]> data, size_t length) |
| 580 | { |
no test coverage detected