nghttpx: Check worker wide blocker before creating new downstream connection

This commit is contained in:
Tatsuhiro Tsujikawa 2020-09-19 23:22:14 +09:00
parent 1570d5f694
commit 7b4de401d2
1 changed files with 8 additions and 0 deletions

View File

@ -985,6 +985,14 @@ ClientHandler::get_downstream_connection(int &err, Downstream *downstream) {
return dconn;
}
if (worker_->get_connect_blocker()->blocked()) {
if (LOG_ENABLED(INFO)) {
DCLOG(INFO, this)
<< "Worker wide backend connection was blocked temporarily";
}
return nullptr;
}
if (LOG_ENABLED(INFO)) {
CLOG(INFO, this) << "Downstream connection pool is empty."
<< " Create new one";