summaryrefslogtreecommitdiff
path: root/src/HttpDownloadCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/HttpDownloadCommand.cc')
-rw-r--r--src/HttpDownloadCommand.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HttpDownloadCommand.cc b/src/HttpDownloadCommand.cc
index c23142ee..de4d6f27 100644
--- a/src/HttpDownloadCommand.cc
+++ b/src/HttpDownloadCommand.cc
@@ -47,9 +47,7 @@ HttpDownloadCommand::HttpDownloadCommand(int cuid,
HttpDownloadCommand::~HttpDownloadCommand() {}
bool HttpDownloadCommand::prepareForNextSegment() {
- if(_requestGroup->getSegmentMan()->finished()) {
- return true;
- } else {
+ if(!_requestGroup->getSegmentMan()->finished()) {
if(req->isKeepAlive()) {
Command* command = new HttpRequestCommand(cuid, req, _requestGroup, e, socket);
e->commands.push_back(command);
@@ -57,5 +55,7 @@ bool HttpDownloadCommand::prepareForNextSegment() {
} else {
return DownloadCommand::prepareForNextSegment();
}
+ } else {
+ return DownloadCommand::prepareForNextSegment();
}
}