From 4a0d5116d77013df8412d0ac743abab79813b0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 14 Nov 2023 11:20:17 -0800 Subject: [PATCH] treat all signal messages as ping response (#243) --- livekit-api/src/signal_client/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livekit-api/src/signal_client/mod.rs b/livekit-api/src/signal_client/mod.rs index fe77aae58..7e969edae 100644 --- a/livekit-api/src/signal_client/mod.rs +++ b/livekit-api/src/signal_client/mod.rs @@ -361,11 +361,12 @@ async fn signal_task( .as_millis() as i64; rtt = now - pong.last_ping_timestamp; - ping_timeout.as_mut().reset(Instant::now() + timeout_duration); } _ => {} } + ping_timeout.as_mut().reset(Instant::now() + timeout_duration); + let _ = emitter.send(SignalEvent::Message(signal)); } else { let _ = emitter.send(SignalEvent::Close("stream closed".into()));