mirror of
https://github.com/aria2/aria2.git
synced 2025-01-01 07:36:24 +00:00
Ensure that num of commands is 0 before processing tracker response
This commit is contained in:
parent
3c39931566
commit
e2bf627b17
@ -112,7 +112,12 @@ bool TrackerWatcherCommand::execute() {
|
||||
A2_LOG_ERROR_EX(EX_EXCEPTION_CAUGHT, ex);
|
||||
}
|
||||
}
|
||||
} else if(trackerRequestGroup_->downloadFinished()){
|
||||
} else if(trackerRequestGroup_->getNumCommand() == 0 &&
|
||||
trackerRequestGroup_->downloadFinished()){
|
||||
// We really want to make sure that tracker request has finished
|
||||
// by checking getNumCommand() == 0. Because we reset
|
||||
// trackerRequestGroup_, if it is still used in other Command, we
|
||||
// will get Segmentation fault.
|
||||
try {
|
||||
std::string trackerResponse = getTrackerResponse(trackerRequestGroup_);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user