Commit a1b10622 authored by octal's avatar octal

Client: now resetting the parser when a response is received and increased the size of the queue

parent 61f42550
...@@ -340,7 +340,7 @@ private: ...@@ -340,7 +340,7 @@ private:
typedef std::lock_guard<Lock> Guard; typedef std::lock_guard<Lock> Guard;
Lock queuesLock; Lock queuesLock;
std::unordered_map<std::string, MPMCQueue<Connection::RequestData *, 128>> requestsQueues; std::unordered_map<std::string, MPMCQueue<Connection::RequestData *, 2048>> requestsQueues;
RequestBuilder prepareRequest(std::string resource, Http::Method method); RequestBuilder prepareRequest(std::string resource, Http::Method method);
......
...@@ -461,6 +461,7 @@ Connection::handleResponsePacket(const char* buffer, size_t bytes) { ...@@ -461,6 +461,7 @@ Connection::handleResponsePacket(const char* buffer, size_t bytes) {
req.resolve(std::move(parser_.response)); req.resolve(std::move(parser_.response));
req.onDone(); req.onDone();
parser_.reset();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment