diff --git a/src/HTTPRequestQueue.cpp b/src/HTTPRequestQueue.cpp index dba9c13e70308995790fd266b48300df364a60af..11f39b4a512b6bf2ad6f4a1ac865a69f76b330cd 100644 --- a/src/HTTPRequestQueue.cpp +++ b/src/HTTPRequestQueue.cpp @@ -23,20 +23,24 @@ HTTPRequestQueue::~HTTPRequestQueue() { } void HTTPRequestQueue::handleRequestFinished() { + m_req = NULL; m_queueTimer->start(); } void HTTPRequestQueue::sendNextRequest() { if (m_queue.empty()) { + LOG4CXX_INFO(logger, "queue is empty"); m_req = NULL; m_queueTimer->stop(); return; } if (m_req) { + LOG4CXX_INFO(logger, "we are handling the request"); return; } + LOG4CXX_INFO(logger, "Starting new request"); m_req = m_queue.front(); m_queue.pop(); m_req->onRequestFinished.connect(boost::bind(&HTTPRequestQueue::handleRequestFinished, this)); @@ -46,6 +50,7 @@ void HTTPRequestQueue::sendNextRequest() { void HTTPRequestQueue::queueRequest(HTTPRequest *req) { m_queue.push(req); + LOG4CXX_INFO(logger, "request queued"); if (!m_req) { sendNextRequest(); }