Commit 4877f72a authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Optimize a bit

parent 274b3a22
......@@ -208,9 +208,9 @@ int Http2Session::disconnect(bool hard) {
// this object. In order to achieve this, we first swap dconns_ and
// streams_. Upstream::on_downstream_reset() may add
// Http2DownstreamConnection.
std::set<Http2DownstreamConnection *> dconns;
std::unordered_set<Http2DownstreamConnection *> dconns;
dconns.swap(dconns_);
std::set<StreamData *> streams;
std::unordered_set<StreamData *> streams;
streams.swap(streams_);
std::set<ClientHandler *> handlers;
......
......@@ -27,7 +27,7 @@
#include "shrpx.h"
#include <set>
#include <unordered_set>
#include <memory>
#include <openssl/ssl.h>
......@@ -188,8 +188,8 @@ private:
// connection check has started, this timer is started again and
// traps PING ACK timeout.
ev_timer connchk_timer_;
std::set<Http2DownstreamConnection *> dconns_;
std::set<StreamData *> streams_;
std::unordered_set<Http2DownstreamConnection *> dconns_;
std::unordered_set<StreamData *> streams_;
std::function<int(Http2Session &)> read_, write_;
std::function<int(Http2Session &)> on_read_, on_write_;
// Used to parse the response from HTTP proxy
......
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