26 bool firstAuth =
true;
28 int maxTries = req->transferSettings().maxSilentTries();
31 std::optional<internal::ProgressTracker> progTracker;
33 std::vector<zyppng::connection> signalConnections {
39 if ( !report || !progTracker )
42 progTracker->updateStats( dlTotal, dlNow );
43 if ( !(*report)->progress( progTracker->_dnlPercent, req.
url(), progTracker-> _drateTotal, progTracker->_drateLast ) )
54 std::for_each( signalConnections.begin(), signalConnections.end(), [](
auto &conn ) { conn.disconnect(); });
55 signalConnections.clear();
71 if ( req->hasError() ) {
73 std::exception_ptr excp;
74 const auto &error = req->error();
75 switch ( error.type() ) {
117 std::string authHint = error.extraInfoValue(
"authHint", std::string());
119 bool canContinue =
false;
120 _sigAuthRequired.emit( req->url(), req->transferSettings(), authHint, firstAuth, canContinue );
133 DBG <<
"BUG: Download error flag is set , but Error code is NoError" << std::endl;
143 if ( !retry && ( maxTries - 1 ) > 0 ) {
149 if ( report ) (*report)->finish( req->url(), errCode, error.toString() );
150 std::rethrow_exception( excp );
SignalProxy< void(NetworkRequest &req, off_t dltotal, off_t dlnow, off_t ultotal, off_t ulnow)> sigProgress()
Signals if there was data read from the download.