diff --git a/CurlHandler.cpp b/CurlHandler.cpp index d1a5b2a..9248ed5 100755 --- a/CurlHandler.cpp +++ b/CurlHandler.cpp @@ -5,7 +5,7 @@ CurlHandler::CurlHandler() } CurlHandler::~CurlHandler() { - for (auto& t : v) + for (auto &t: v) t.join(); } @@ -47,7 +47,7 @@ std::vector *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;