Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist-1.9.x: Revert "dnsdist: Release failed TCP backend connections more quickly" #14040

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions pdns/dnsdistdist/dnsdist-tcp-downstream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,6 @@ void TCPConnectionToBackend::release(){
if (d_ioState) {
d_ioState.reset();
}

auto shared = std::dynamic_pointer_cast<TCPConnectionToBackend>(shared_from_this());
if (!willBeReusable(true)) {
/* remove ourselves from the connection cache, this might mean that our
reference count drops to zero after that, so we need to be careful */
t_downstreamTCPConnectionsManager.removeDownstreamConnection(shared);
}
}

static uint32_t getSerialFromRawSOAContent(const std::vector<uint8_t>& raw)
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsdistdist/test-dnsdisttcp_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3624,8 +3624,8 @@ BOOST_FIXTURE_TEST_CASE(test_IncomingConnectionOOOR_BackendOOOR, TestFixture)
g_tcpRecvTimeout = 2;

/* we need to clear them now, otherwise we end up with dangling pointers to the steps via the TLS context, etc */
/* we have no connection to clear, because there was a timeout! */
BOOST_CHECK_EQUAL(IncomingTCPConnectionState::clearAllDownstreamConnections(), 0U);
/* we have one connection to clear, no proxy protocol */
BOOST_CHECK_EQUAL(IncomingTCPConnectionState::clearAllDownstreamConnections(), 1U);
}

{
Expand Down