MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnFailure

Method OnFailure

src/network/network_content.cpp:559–577  ·  view source on GitHub ↗

Also called to just clean up the mess. */

Source from the content-addressed store, hash-verified

557
558/* Also called to just clean up the mess. */
559void 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
579void ClientNetworkContentSocketHandler::OnReceiveData(std::unique_ptr<char[]> data, size_t length)
580{

Callers 1

OnReceiveDataMethod · 0.95

Calls 4

OnDownloadProgressMethod · 0.95
clearMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected