Explicit Reasons of Session Fallback Cleanup + ME Close

This commit is contained in:
Alexey
2026-05-10 13:50:36 +03:00
parent 090b2ca636
commit 6cb72b3b6c
6 changed files with 44 additions and 13 deletions
+3 -6
View File
@@ -1310,7 +1310,7 @@ where
let Some(first) = msg else {
debug!(conn_id, "ME channel closed");
shrink_session_vec(&mut frame_buf, shrink_threshold);
return Err(ProxyError::Proxy("ME connection lost".into()));
return Err(ProxyError::MiddleConnectionLost);
};
let mut batch_frames = 0usize;
@@ -1575,7 +1575,7 @@ where
Ok(None) => {
debug!(conn_id, "ME channel closed");
shrink_session_vec(&mut frame_buf, shrink_threshold);
return Err(ProxyError::Proxy("ME connection lost".into()));
return Err(ProxyError::MiddleConnectionLost);
}
Err(_) => {
max_delay_fired = true;
@@ -1853,10 +1853,7 @@ where
// When client closes, but ME channel stopped as unregistered - it isnt error
if client_closed
&& matches!(
writer_result,
Err(ProxyError::Proxy(ref msg)) if msg == "ME connection lost"
)
&& matches!(writer_result, Err(ProxyError::MiddleConnectionLost))
{
writer_result = Ok(());
}