Fix native ping connection lifecycle
Some checks failed
CI / checks (push) Failing after 2m49s

This commit is contained in:
Alois 2026-07-28 22:26:45 +02:00
commit b6483b7f6d
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
6 changed files with 198 additions and 73 deletions

View file

@ -938,12 +938,8 @@ impl Receiver {
}
/* Route reserved Pong frames to a connection-level observer. */
pub fn observe_pongs(&self, observer: mpsc::UnboundedSender<CommunicationValue>) {
if let Ok(mut control) = self.inner.ping_control.try_write() {
control.pong_observer = Some(observer);
} else {
warn!("[Receiver] could not register Pong observer: control lock busy");
}
pub async fn observe_pongs(&self, observer: mpsc::UnboundedSender<CommunicationValue>) {
self.inner.ping_control.write().await.pong_observer = Some(observer);
}
#[instrument(skip(stream, policy), level = "trace")]