Record bounded session/channel close diagnostics on agent and gateway
Rust development slice / linux (push) Failing after 7s
Rust development slice / linux (push) Failing after 7s
This commit is contained in:
@@ -102,10 +102,9 @@ pub async fn connect(
|
||||
.max_message_size(MAX_MESSAGE)
|
||||
.max_frame_size(MAX_MESSAGE)
|
||||
.on_upgrade(move |mut socket| async move {
|
||||
if channel(&state, &mut socket, tenant, agent, expires)
|
||||
.await
|
||||
.is_err()
|
||||
{
|
||||
if let Err(error) = channel(&state, &mut socket, tenant, agent, expires).await {
|
||||
// Operator diagnostics only: the bounded error chain, no payloads or keys.
|
||||
eprintln!("WSS_CHANNEL_CLOSED agent={agent} error={error:#}");
|
||||
let _ = socket.send(Message::Close(None)).await;
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user