diff --git a/src/FwdState.cc b/src/FwdState.cc index 62c33a67f84..479fd1082a5 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -708,7 +708,7 @@ FwdState::checkRetry() if (exhaustedTries()) return false; - if (request->flags.pinned && !pinnedCanRetry()) + if (request->flags.pinned) return false; if (!EnoughTimeToReForward(start_t)) @@ -1323,7 +1323,7 @@ FwdState::reforward() debugs(17, 3, e->url() << "?" ); - if (request->flags.pinned && !pinnedCanRetry()) { + if (request->flags.pinned) { debugs(17, 3, "pinned connection; cannot retry"); return 0; } @@ -1418,28 +1418,6 @@ FwdState::exhaustedTries() const return n_tries >= Config.forward_max_tries; } -bool -FwdState::pinnedCanRetry() const -{ - assert(request->flags.pinned); - - // pconn race on pinned connection: Currently we do not have any mechanism - // to retry current pinned connection path. - if (pconnRace == raceHappened) - return false; - - // If a bumped connection was pinned, then the TLS client was given our peer - // details. Do not retry because we do not ensure that those details stay - // constant. Step1-bumped connections do not get our TLS peer details, are - // never pinned, and, hence, never reach this method. - if (request->flags.sslBumped) - return false; - - // The other pinned cases are FTP proxying and connection-based HTTP - // authentication. TODO: Do these cases have restrictions? - return true; -} - time_t FwdState::connectingTimeout(const Comm::ConnectionPointer &conn) const { diff --git a/src/FwdState.h b/src/FwdState.h index 1427b928ebb..1dc2d4e3b70 100644 --- a/src/FwdState.h +++ b/src/FwdState.h @@ -161,10 +161,6 @@ class FwdState: public RefCountable, public PeerSelectionInitiator void usePinned(); - /// whether a pinned to-peer connection can be replaced with another one - /// (in order to retry or reforward a failed request) - bool pinnedCanRetry() const; - template void advanceDestination(const char *stepDescription, const Comm::ConnectionPointer &conn, const StepStart &startStep); diff --git a/src/tunnel.cc b/src/tunnel.cc index 5da201b6bd6..041ae0be595 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -517,7 +517,7 @@ TunnelStateData::checkRetry() if (request->hier.peer_reply_status != Http::scNone && !Http::IsReforwardableStatus(request->hier.peer_reply_status)) return "received HTTP status code is not reforwardable"; - // TODO: check pinned connections; see FwdState::pinnedCanRetry() + // TODO: check pinned connections; see request->flags.pinned in FwdState::checkRetry() return nullptr; }