mirror of https://github.com/aria2/aria2
2008-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
If an error occurred with a URI, remove identical URI from remaining URI list because it is likely that same error occurred in the end and it is waste of time. * src/AbstractCommand.cc * src/RequestGroup.cc * src/RequestGroup.hpull/1/head
parent
09077b809f
commit
d3453a8387
|
@ -1,3 +1,12 @@
|
|||
2008-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
If an error occurred with a URI, remove identical URI from remaining
|
||||
URI list because it is likely that same error occurred in the end and it
|
||||
is waste of time.
|
||||
* src/AbstractCommand.cc
|
||||
* src/RequestGroup.cc
|
||||
* src/RequestGroup.h
|
||||
|
||||
2008-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Removed wrong comment.
|
||||
|
|
|
@ -213,6 +213,7 @@ void AbstractCommand::onAbort() {
|
|||
if(!_requestGroup->getPieceStorage().isNull()) {
|
||||
_requestGroup->getSegmentMan()->cancelSegment(cuid);
|
||||
}
|
||||
_requestGroup->removeIdenticalURI(req->getUrl());
|
||||
}
|
||||
|
||||
void AbstractCommand::disableReadCheckSocket() {
|
||||
|
|
|
@ -960,6 +960,11 @@ void RequestGroup::removeURIWhoseHostnameIs(const std::string& hostname)
|
|||
_uris = newURIs;
|
||||
}
|
||||
|
||||
void RequestGroup::removeIdenticalURI(const std::string& uri)
|
||||
{
|
||||
_uris.erase(std::remove(_uris.begin(), _uris.end(), uri), _uris.end());
|
||||
}
|
||||
|
||||
void RequestGroup::reportDownloadFinished()
|
||||
{
|
||||
_logger->notice(MSG_FILE_DOWNLOAD_COMPLETED,
|
||||
|
|
|
@ -342,6 +342,8 @@ public:
|
|||
|
||||
void removeURIWhoseHostnameIs(const std::string& hostname);
|
||||
|
||||
void removeIdenticalURI(const std::string& uri);
|
||||
|
||||
void reportDownloadFinished();
|
||||
|
||||
const std::deque<std::string>& getAcceptFeatures() const;
|
||||
|
|
Loading…
Reference in New Issue