Commit 62411f5a authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Set client_handler to special frontend objects

parent e9465f0e
......@@ -902,10 +902,16 @@ ClientHandler::get_downstream_connection(int &err, Downstream *downstream) {
err = 0;
switch (faddr_->alt_mode) {
case UpstreamAltMode::API:
return std::make_unique<APIDownstreamConnection>(worker_);
case UpstreamAltMode::HEALTHMON:
return std::make_unique<HealthMonitorDownstreamConnection>();
case UpstreamAltMode::API: {
auto dconn = std::make_unique<APIDownstreamConnection>(worker_);
dconn->set_client_handler(this);
return dconn;
}
case UpstreamAltMode::HEALTHMON: {
auto dconn = std::make_unique<HealthMonitorDownstreamConnection>();
dconn->set_client_handler(this);
return dconn;
}
default:
break;
}
......
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