1
0
Fork 0

Merge branch 'obi-velocystream' into obi-velocystream-stupid

* obi-velocystream:
  fix memleak
This commit is contained in:
Jan Christoph Uhde 2016-08-31 11:44:46 +02:00
commit b214771fd3
2 changed files with 6 additions and 4 deletions

View File

@ -60,7 +60,8 @@ HttpCommTask::HttpCommTask(GeneralServer* server, TRI_socket_t sock,
_sinceCompactification(0),
_originalBodyLength(0) { // TODO(fc) remove
_protocol = "http";
connectionStatisticsAgentSetHttp(); // old
connectionStatisticsAgentSetHttp(); // this agent is inherited form
// sockettask or task
_agents.emplace(std::make_pair(1UL, RequestStatisticsAgent(true)));
}

View File

@ -115,11 +115,12 @@ class RequestStatisticsAgent
public:
RequestStatisticsAgent(bool standalone = false)
: StatisticsAgent(standalone){};
~RequestStatisticsAgent() = default;
RequestStatisticsAgent(RequestStatisticsAgent const&) = delete;
RequestStatisticsAgent(RequestStatisticsAgent&& other) {
other._statistics = meta::exchange(_statistics, nullptr);
other._lastReadStart = _lastReadStart;
_statistics = meta::exchange(other._statistics, nullptr);
_lastReadStart = other._lastReadStart;
other._lastReadStart = 0.0;
}
void requestStatisticsAgentSetRequestType(rest::RequestType b) {