aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-proxy/src/proxy_trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'pingora-proxy/src/proxy_trait.rs')
-rw-r--r--pingora-proxy/src/proxy_trait.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/pingora-proxy/src/proxy_trait.rs b/pingora-proxy/src/proxy_trait.rs
index 4017789..6970ec0 100644
--- a/pingora-proxy/src/proxy_trait.rs
+++ b/pingora-proxy/src/proxy_trait.rs
@@ -372,7 +372,6 @@ pub trait ProxyHttp {
where
Self::CTX: Send + Sync,
{
- let server_session = session.as_mut();
let code = match e.etype() {
HTTPStatus(code) => *code,
_ => {
@@ -392,7 +391,9 @@ pub trait ProxyHttp {
}
};
if code > 0 {
- server_session.respond_error(code).await
+ session.respond_error(code).await.unwrap_or_else(|e| {
+ error!("failed to send error response to downstream: {e}");
+ });
}
code
}