aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-proxy
diff options
context:
space:
mode:
authorEdward Wang <[email protected]>2024-06-19 13:48:59 -0700
committerEdward Wang <[email protected]>2024-06-28 12:34:25 -0700
commit03bd29044e8367b9e44ac7b31e0c7aa152cf6b60 (patch)
treea985e8cfa1dcb5ec2d0b643bb796d40729b6c9d0 /pingora-proxy
parentfbf3a9574930077ed01f955e9e8df2ec74a51215 (diff)
downloadpingora-03bd29044e8367b9e44ac7b31e0c7aa152cf6b60.tar.gz
pingora-03bd29044e8367b9e44ac7b31e0c7aa152cf6b60.zip
Always respect_keepalive when releasing http session
When a user calls `release_http_session` on an http Connector, it is usually implied that they intend to reuse the underlying connection if possible. Previously for H1 this involved reaching into the H1 client Session and calling `respect_keepalive`. The new behavior always respects keepalive as part of releasing the http session, as it was very easy to overlook this step and unintentionally disable connection reuse for H1 sessions.
Diffstat (limited to 'pingora-proxy')
-rw-r--r--pingora-proxy/src/proxy_h1.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/pingora-proxy/src/proxy_h1.rs b/pingora-proxy/src/proxy_h1.rs
index feac860..de49c03 100644
--- a/pingora-proxy/src/proxy_h1.rs
+++ b/pingora-proxy/src/proxy_h1.rs
@@ -98,10 +98,7 @@ impl<SV> HttpProxy<SV> {
);
match ret {
- Ok((_first, _second)) => {
- client_session.respect_keepalive();
- (true, true, None)
- }
+ Ok((_first, _second)) => (true, true, None),
Err(e) => (false, false, Some(e)),
}
}