Skip to content

Commit

Permalink
nghttpx: Check worker wide blocker before creating new downstream con…
Browse files Browse the repository at this point in the history
…nection
  • Loading branch information
tatsuhiro-t committed Sep 19, 2020
1 parent 1570d5f commit 7b4de40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/shrpx_client_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 7b4de40

Please sign in to comment.