CurlHandler: Fix downloading any number of emails.
This commit is contained in:
parent
0f160a1f63
commit
25d5bd12f8
@ -5,7 +5,7 @@ CurlHandler::CurlHandler()
|
||||
}
|
||||
|
||||
CurlHandler::~CurlHandler() {
|
||||
for (auto& t : v)
|
||||
for (auto &t: v)
|
||||
t.join();
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ std::vector<std::string> *CurlHandler::fetch() {
|
||||
decodedMessages.resize(messagesId.size());
|
||||
count = 0;
|
||||
|
||||
for (auto i{messagesId.rbegin()}; i != messagesId.rbegin() + 5; i++)
|
||||
for (auto i{messagesId.rbegin()}; i != messagesId.rbegin() + 10 && i != messagesId.rend(); i++)
|
||||
v.emplace_back(&CurlHandler::query, this, std::ref(*i), count++);
|
||||
|
||||
return &decodedMessages;
|
||||
|
Loading…
Reference in New Issue
Block a user