nghttpx: Code cleanup

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-22 11:26:32 +09:00
parent 09fd95ac5c
commit 86aa905c10
1 changed files with 4 additions and 3 deletions

View File

@ -127,10 +127,11 @@ int Http2Session::disconnect()
// Http2DownstreamConnection objects belong to the same ClientHandler
// object. So first dump ClientHandler objects and delete them once
// and for all.
std::vector<Http2DownstreamConnection*> vec(dconns_.begin(), dconns_.end());
std::vector<Http2DownstreamConnection*> vec(std::begin(dconns_),
std::end(dconns_));
std::set<ClientHandler*> handlers;
for(size_t i = 0; i < vec.size(); ++i) {
handlers.insert(vec[i]->get_client_handler());
for(auto dc : vec) {
handlers.insert(dc->get_client_handler());
}
for(auto& h : handlers) {
delete h;